Skip to content

Update method & behavior: lineStart/End, not paragraphStart/End #419

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

Merged
merged 3 commits into from
Jan 16, 2017
Merged

Update method & behavior: lineStart/End, not paragraphStart/End #419

merged 3 commits into from
Jan 16, 2017

Conversation

JordanMartinez
Copy link
Contributor

The methods lineStart and lineEnd move the cursor to the start and end of the paragraph, not the line. Their names should be changed to paragraphStart and paragraphEnd to avoid confusion, as well as renaming selectLine to selectParagraph.

When pressing either Home or End, the caret position should change relative to the current line, not the current paragraph, which is what users have come to expect (e.g., the text area used to write this message has typical home/end key behaviour). There are a few related issues: #384 and #360.

@JordanMartinez JordanMartinez changed the title Implements the other feature request in #386 Update method & behavior: lineStart/End, not paragraphStart/End Jan 10, 2017
Methods:
- line start
- line end
- select Line
…line, not paragraph

Note: triple-clicking the area will still select the that paragraph, not that line
@JordanMartinez JordanMartinez merged commit 4443749 into FXMisc:master Jan 16, 2017
@JordanMartinez JordanMartinez deleted the lineNotParagraphStartAndEnd branch January 16, 2017 20:39
@JordanMartinez
Copy link
Contributor Author

Apparently, I wrote this in the wrong PR:

This works in all cases except when the caret is on the last line in a multi-line paragraph. When calling lineEnd, it will move the caret to the second-to-last position.

When I accounted for this, it then screwed up caret navigation via the arrows keys in rare cases.

However, it turns out this was an unrelated bug. See #423.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant