mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-08-17 08:11:00 +03:00
Fix escaping of multiple forward slashes in visualstar search (#9112)
Fixes #9111
This commit is contained in:
parent
2ec951a425
commit
0216186037
@ -99,7 +99,7 @@ async function createSearchStateAndMoveToMatch(args: {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const escapedNeedle = escapeRegExp(needle).replace('/', '\\/');
|
const escapedNeedle = escapeRegExp(needle).replaceAll('/', '\\/');
|
||||||
const searchString = isExact ? `\\<${escapedNeedle}\\>` : escapedNeedle;
|
const searchString = isExact ? `\\<${escapedNeedle}\\>` : escapedNeedle;
|
||||||
|
|
||||||
// Start a search for the given term.
|
// Start a search for the given term.
|
||||||
|
@ -1088,9 +1088,9 @@ suite('Mode Visual', () => {
|
|||||||
|
|
||||||
newTest({
|
newTest({
|
||||||
title: '`*` escapes `/` properly',
|
title: '`*` escapes `/` properly',
|
||||||
start: ['one |two/three four', 'one two/three four'],
|
start: ['one |two//three four', 'one two//three four'],
|
||||||
keysPressed: 'vE*',
|
keysPressed: 'vE*',
|
||||||
end: ['one two/three four', 'one |two/three four'],
|
end: ['one two//three four', 'one |two//three four'],
|
||||||
endMode: Mode.Normal,
|
endMode: Mode.Normal,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user