diff --git a/package.json b/package.json index 609ed210e..9f8266d23 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 f9b5216ae..c1686e6b8 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 4b8ffe5ea..8433561ce 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'], + }); });