diff options
author | hluk <hluk@email.cz> | 2013-08-06 18:15:05 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2013-08-07 10:43:38 +0200 |
commit | 5a02089e3cd165d1774e2b0f0e8d466f0688f9dd (patch) | |
tree | 5b555652ac7279ba231cdb41bd6c463a4b629ddf /src/plugins/fakevim | |
parent | 7c5b19ebf4f4909a452ee78abe79e60e4d12a2cf (diff) | |
download | qt-creator-5a02089e3cd165d1774e2b0f0e8d466f0688f9dd.tar.gz |
FakeVim: Record jumps on paragraph and bracket movement
Change-Id: I7e1bfad127a11118606efbf603bbf8a393ec00b0
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r-- | src/plugins/fakevim/fakevimhandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 394974b74a..72ad08d1d6 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -2855,6 +2855,7 @@ bool FakeVimHandler::Private::moveToNextParagraph(int count) { const bool forward = count > 0; int repeat = forward ? count : -count; + int pos = position(); QTextBlock block = this->block(); if (block.isValid() && block.length() == 1) @@ -2876,6 +2877,7 @@ bool FakeVimHandler::Private::moveToNextParagraph(int count) else return false; + recordJump(pos); setTargetColumn(); g.movetype = MoveExclusive; @@ -3375,6 +3377,8 @@ bool FakeVimHandler::Private::handleCommandSubSubMode(const Input &input) emit q->foldGoTo(g.subsubmode == OpenSquareSubSubMode ? -count() : count(), true); handled = pos != position(); if (handled) { + if (lineForPosition(pos) != lineForPosition(position())) + recordJump(pos); finishMovement(QString::fromLatin1("%1%2%3") .arg(count()) .arg(g.subsubmode == OpenSquareSubSubMode ? '[' : ']') |