Skip to content

Commit

Permalink
fix #528
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Oct 21, 2016
1 parent 41c803c commit 811b682
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
"command": "extension.vim_backspace",
"when": "editorTextFocus && !inDebugRepl"
},
{
"key": "shift+backspace",
"command": "extension.vim_shift+backspace",
"when": "editorTextFocus && vim.mode == 'Search In Progress' && !inDebugRepl"
},
{
"key": "Delete",
"command": "extension.vim_delete",
Expand Down
3 changes: 2 additions & 1 deletion src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ let compareKeypressSequence = function (one: string[] | string[][], two: string[

const containsControlKey = (s: string): boolean => {
return s.toUpperCase() !== "<BS>" &&
s.toUpperCase() !== "<SHIFT+BS>" &&
s.toUpperCase() !== "<TAB>" &&
s.startsWith("<") &&
s.length > 1;
Expand Down Expand Up @@ -1364,7 +1365,7 @@ class CommandInsertInSearchMode extends BaseCommand {
const searchState = vimState.searchState!;

// handle special keys first
if (key === "<BS>") {
if (key === "<BS>" || key === "<shift+BS>") {
searchState.searchString = searchState.searchString.slice(0, -1);
} else if (key === "\n") {
vimState.currentMode = ModeName.Normal;
Expand Down

0 comments on commit 811b682

Please sign in to comment.