Skip to content

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

Closed
sonulohani wants to merge 1 commit intocpeditor:masterfrom
sonulohani:home_key_move_cursor_to_first_non_whitespace
Closed

feat: Pressing home-key move at the beg of line#32
sonulohani wants to merge 1 commit intocpeditor:masterfrom
sonulohani:home_key_move_cursor_to_first_non_whitespace

Conversation

@sonulohani
Copy link

@sonulohani sonulohani commented Mar 18, 2021

Fixes

@sonulohani sonulohani requested review from coder3101 and ouuan 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