diff options
author | hjk <hjk@qt.io> | 2017-09-08 13:39:37 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-09-11 09:03:54 +0000 |
commit | 8037d5e02f510446dfe3661b72057fb5d782b998 (patch) | |
tree | 9a1732631edf9f8e49912e5949d2279a2c271f7d /src/plugins | |
parent | 201a09b5c5b71fb6cdd242801c0af3c54061c960 (diff) | |
download | qt-creator-8037d5e02f510446dfe3661b72057fb5d782b998.tar.gz |
FakeVim: Properly recognize tabp...tabprevious
Note that this does not fully solve the linked issue as the
triggered GOTOPREVINHISTORY action does not have the same
behavior as :tabprevious
Task-number: QTCREATORBUG-18843
Change-Id: I26a719f77d2c1727bb18da46e13f5a0be48473bc
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/fakevim/fakevimhandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 21f218e03f..892e6912ae 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -4422,7 +4422,7 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input) } else if (g.gflag && input.is('t')) { handleExCommand("tabnext"); } else if (g.gflag && input.is('T')) { - handleExCommand("tabprev"); + handleExCommand("tabprevious"); } else if (input.isControl('t')) { handleExCommand("pop"); } else if (!g.gflag && input.is('u') && !isVisualMode()) { @@ -5565,7 +5565,7 @@ bool FakeVimHandler::Private::handleExSubstituteCommand(const ExCommand &cmd) bool FakeVimHandler::Private::handleExTabNextCommand(const ExCommand &cmd) { - if (cmd.cmd != "tabnext" && cmd.cmd != "tabn") + if (!cmd.matches("tabn", "tabnext")) return false; emit q->tabNextRequested(q); @@ -5574,7 +5574,7 @@ bool FakeVimHandler::Private::handleExTabNextCommand(const ExCommand &cmd) bool FakeVimHandler::Private::handleExTabPreviousCommand(const ExCommand &cmd) { - if (cmd.cmd != "tabprevious" && cmd.cmd != "tabp") + if (!cmd.matches("tabp", "tabprevious")) return false; emit q->tabPreviousRequested(q); |