Skip to content

feat: Pressing home-key move at the beg of line #32

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

Closed
wants to merge 1 commit into from
Closed

feat: Pressing home-key move at the beg of line #32

wants to merge 1 commit into from

Conversation

sonulohani
Copy link

@sonulohani sonulohani commented Mar 18, 2021

Fixes

@sonulohani sonulohani requested review from ouuan and coder3101 March 18, 2021 04:15
@sonulohani sonulohani self-assigned this Mar 18, 2021
@ouuan
Copy link
Member

ouuan commented Mar 20, 2021

  1. You should use QKeySequence::MoveToStartOfLine.
  2. You should move the cursor only once.
  3. You'd better use QTextCursor::PreviousCharacter instead of QTextCursor::Left. They are the same, but it's a good habit: QTextCursor::Down and QTextCursor::NextBlock are different.
  4. You should use QRegularExpressionMatch::capturedLength.

@sonulohani sonulohani closed this Mar 21, 2021
@sonulohani sonulohani deleted the home_key_move_cursor_to_first_non_whitespace branch March 21, 2021 05:30
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.

2 participants