Skip to content

Commit

Permalink
Actually implement <Del> in command line mode
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Fields authored and stevenguh committed Aug 27, 2019
1 parent 66b7952 commit b4caf44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,7 @@ class CommandInsertInCommandline extends BaseCommand {
['<C-f>'],
['<Home>'],
['<End>'],
['<Del>'],
];
runsOnceForEveryCursor() {
return this.keysPressed[0] === '\n';
Expand All @@ -2045,6 +2046,10 @@ class CommandInsertInCommandline extends BaseCommand {
vimState.statusBarCursorCharacterPos = Math.max(vimState.statusBarCursorCharacterPos - 1, 0);
} else if (key === '<C-f>') {
new CommandShowCommandHistory().exec(position, vimState);
} else if (key === '<Del>') {
vimState.currentCommandlineText =
vimState.currentCommandlineText.slice(0, vimState.statusBarCursorCharacterPos) +
vimState.currentCommandlineText.slice(vimState.statusBarCursorCharacterPos + 1);
} else if (key === '<Home>') {
vimState.statusBarCursorCharacterPos = 0;
} else if (key === '<End>') {
Expand Down

0 comments on commit b4caf44

Please sign in to comment.