mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-10-05 16:17:18 +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;
|
||||
}
|
||||
|
||||
const escapedNeedle = escapeRegExp(needle).replace('/', '\\/');
|
||||
const escapedNeedle = escapeRegExp(needle).replaceAll('/', '\\/');
|
||||
const searchString = isExact ? `\\<${escapedNeedle}\\>` : escapedNeedle;
|
||||
|
||||
// Start a search for the given term.
|
||||
|
@ -1088,9 +1088,9 @@ suite('Mode Visual', () => {
|
||||
|
||||
newTest({
|
||||
title: '`*` escapes `/` properly',
|
||||
start: ['one |two/three four', 'one two/three four'],
|
||||
start: ['one |two//three four', 'one two//three four'],
|
||||
keysPressed: 'vE*',
|
||||
end: ['one two/three four', 'one |two/three four'],
|
||||
end: ['one two//three four', 'one |two//three four'],
|
||||
endMode: Mode.Normal,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user