mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 18:46:36 -05:00
Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 (#6516)
* Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 * fix tests
This commit is contained in:
@@ -17,7 +17,8 @@ export const enum ClassName {
|
||||
EditorWarningDecoration = 'squiggly-warning',
|
||||
EditorErrorDecoration = 'squiggly-error',
|
||||
EditorUnnecessaryDecoration = 'squiggly-unnecessary',
|
||||
EditorUnnecessaryInlineDecoration = 'squiggly-inline-unnecessary'
|
||||
EditorUnnecessaryInlineDecoration = 'squiggly-inline-unnecessary',
|
||||
EditorDeprecatedInlineDecoration = 'squiggly-inline-deprecated'
|
||||
}
|
||||
|
||||
export const enum NodeColor {
|
||||
|
||||
@@ -545,6 +545,12 @@ export class Searcher {
|
||||
const matchStartIndex = m.index;
|
||||
const matchLength = m[0].length;
|
||||
if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) {
|
||||
if (matchLength === 0) {
|
||||
// the search result is an empty string and won't advance `regex.lastIndex`, so `regex.exec` will stuck here
|
||||
// we attempt to recover from that by advancing by one
|
||||
this._searchRegex.lastIndex += 1;
|
||||
continue;
|
||||
}
|
||||
// Exit early if the regex matches the same range twice
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user