mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-10-27 20:47:54 +03:00
Fix search mode, and add tests so this doesn't happen again.
This commit is contained in:
parent
418bb8d912
commit
208c37d6f9
@ -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",
|
||||
|
@ -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 ||
|
||||
|
@ -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'],
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user