mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
Merge pull request #2812 from xconverge/fix-gt
Make gt work correctly like gT
This commit is contained in:
commit
bd39e6b224
@ -2981,7 +2981,7 @@ class CommandTabNext extends BaseTabCommand {
|
||||
public async exec(position: Position, vimState: VimState): Promise<VimState> {
|
||||
new TabCommand({
|
||||
tab: Tab.Next,
|
||||
count: vimState.recordedState.count,
|
||||
count: 1,
|
||||
}).execute();
|
||||
|
||||
return vimState;
|
||||
|
@ -46,15 +46,14 @@ export class TabCommand extends node.CommandBase {
|
||||
async execute(): Promise<void> {
|
||||
switch (this._arguments.tab) {
|
||||
case Tab.Next:
|
||||
if (this._arguments.count /** not undefined or 0 */) {
|
||||
await vscode.commands.executeCommand('workbench.action.openEditorAtIndex1');
|
||||
await this.executeCommandWithCount(
|
||||
this._arguments.count! - 1,
|
||||
'workbench.action.nextEditorInGroup'
|
||||
);
|
||||
} else {
|
||||
await vscode.commands.executeCommand('workbench.action.nextEditorInGroup');
|
||||
if (this._arguments.count !== undefined && this._arguments.count <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
await this.executeCommandWithCount(
|
||||
this._arguments.count || 1,
|
||||
'workbench.action.nextEditorInGroup'
|
||||
);
|
||||
break;
|
||||
case Tab.Previous:
|
||||
if (this._arguments.count !== undefined && this._arguments.count <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user