Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_get_line() method is not working at the last line #58

Closed
ok97465 opened this issue Jun 8, 2020 · 1 comment · Fixed by #59
Closed

_get_line() method is not working at the last line #58

ok97465 opened this issue Jun 8, 2020 · 1 comment · Fixed by #59
Labels
Milestone

Comments

@ok97465
Copy link
Collaborator

ok97465 commented Jun 8, 2020

_get_line() method is not working at the last line. So "f", "F", "^"... which uses _get_line is not working at the last line.

def _get_line(self, editor_cursor, lines=1):
"""Return the line at cursor position."""
try:
cursor = QTextCursor(editor_cursor)
except TypeError:
print("ERROR: editor_cursor must be an instance of QTextCursor")
else:
cursor.movePosition(QTextCursor.StartOfLine)
cursor.movePosition(QTextCursor.Down, QTextCursor.KeepAnchor,
n=lines)
line = cursor.selectedText().replace('\u2029', '\n')
return line

Thank you.

@goanpeca
Copy link
Member

goanpeca commented Jun 8, 2020

Hi @ok97465 thanks for the report.

I guess another one for @bgallois :-) (anytime you can of course)

Cheers!

@bgallois bgallois mentioned this issue Jun 9, 2020
@ccordoba12 ccordoba12 added this to the v0.1 milestone Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants