Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1286,9 +1286,9 @@ export class CommandInsertNewLineBefore extends BaseCommand {
}

@RegisterAction
class CommandNavigateBack extends BaseCommand {
class CommandJumpBack extends BaseCommand {
modes = [Mode.Normal];
keys = [['<C-o>'], ['<C-t>']];
keys = [['<C-t>']];

override runsOnceForEveryCursor() {
return false;
Expand All @@ -1299,6 +1299,24 @@ class CommandNavigateBack extends BaseCommand {
}
}

@RegisterAction
class CommandNavigateBack extends BaseCommand {
modes = [Mode.Normal];
keys = [['<C-o>']];

override isJump = true;

public override async exec(position: Position, vimState: VimState): Promise<void> {
await vscode.commands.executeCommand('workbench.action.navigateBack');

if (vimState.editor === vscode.window.activeTextEditor) {
// We didn't switch to a different editor
vimState.cursorStartPosition = vimState.editor.selection.start;
vimState.cursorStopPosition = vimState.editor.selection.end;
}
}
}

@RegisterAction
class CommandNavigateForward extends BaseCommand {
modes = [Mode.Normal];
Expand Down