forked from qt-creator/qt-creator
fakevim: fix 'O' at begin of document
'O' would have opened the new line after the first line instead of before Merge-request: 96 Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -1497,9 +1497,12 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
m_beginEditBlock = false;
|
m_beginEditBlock = false;
|
||||||
moveToFirstNonBlankOnLine();
|
moveToFirstNonBlankOnLine();
|
||||||
if (key == 'O')
|
if (key == 'O')
|
||||||
moveUp();
|
moveToStartOfLine();
|
||||||
moveToEndOfLine();
|
else
|
||||||
|
moveToEndOfLine();
|
||||||
m_tc.insertText("\n");
|
m_tc.insertText("\n");
|
||||||
|
if (key == 'O')
|
||||||
|
moveUp();
|
||||||
insertAutomaticIndentation(key == 'o');
|
insertAutomaticIndentation(key == 'o');
|
||||||
endEditBlock();
|
endEditBlock();
|
||||||
} else if (key == control('o')) {
|
} else if (key == control('o')) {
|
||||||
|
Reference in New Issue
Block a user