Skip to content

Commit

Permalink
fix: kill backward & forward word.
Browse files Browse the repository at this point in the history
Change-Id: I5952239f79de21a78299eb40b0663335ffc194ba
  • Loading branch information
rekols committed Sep 19, 2018
1 parent 296869a commit 47a566b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/src/texteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ void TextEditor::killBackwardWord()
// setTextCursor(cursor);

QTextCursor cursor = textCursor();
cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor);
cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);
cursor.removeSelectedText();
setTextCursor(cursor);
}
Expand All @@ -904,7 +904,7 @@ void TextEditor::killForwardWord()
// setTextCursor(cursor);

QTextCursor cursor = textCursor();
cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);
cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor);
cursor.removeSelectedText();
setTextCursor(cursor);
}
Expand Down

0 comments on commit 47a566b

Please sign in to comment.