From 8037d5e02f510446dfe3661b72057fb5d782b998 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 8 Sep 2017 13:39:37 +0200 Subject: 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 Reviewed-by: Christian Stenger --- src/plugins/fakevim/fakevimhandler.cpp | 6 +++--- 1 file 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); -- cgit v1.2.1