diff --git a/package.json b/package.json index 609ed210ee9..9f8266d2315 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Vim", "description": "Vim emulation for Visual Studio Code", "icon": "images/icon.png", - "version": "0.0.22", + "version": "0.0.23", "publisher": "vscodevim", "galleryBanner": { "color": "#a5c9a2", diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index f9b5216ae23..c1686e6b8de 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -300,6 +300,10 @@ export class ModeHandler implements vscode.Disposable { return; } + if (this._vimState.currentMode === ModeName.SearchInProgressMode) { + return; + } + // See comment about justUpdatedState. if (this._vimState.justUpdatedState && ( this._vimState.currentMode === ModeName.Visual || diff --git a/test/mode/modeNormal.test.ts b/test/mode/modeNormal.test.ts index 4b8ffe5ead2..8433561cecb 100644 --- a/test/mode/modeNormal.test.ts +++ b/test/mode/modeNormal.test.ts @@ -449,4 +449,38 @@ suite("Mode Normal", () => { end: ['one', 'two', '|two'] }); + newTest({ + title: "Can run a basic search", + start: ['|one two three'], + keysPressed: '/thr\n', + end: ['one two |three'], + }); + + newTest({ + title: "Can run a basic search", + start: ['|one two three'], + keysPressed: '/thr\n', + end: ['one two |three'], + }); + + newTest({ + title: "Can run a basic search", + start: ['|one two two two'], + keysPressed: '/two\nn', + end: ['one two |two two'], + }); + + newTest({ + title: "Can run a basic search", + start: ['one two thre|e'], + keysPressed: '?two\n', + end: ['one |two three'], + }); + + newTest({ + title: "Can run a basic search", + start: ['one two two thre|e'], + keysPressed: '?two\nn', + end: ['one |two two three'], + }); });