forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user