Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)

* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998

* fix pipelines

* fix strict-null-checks

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-21 22:12:22 -07:00
committed by GitHub
parent 7c9be74970
commit 1e22f47304
913 changed files with 18898 additions and 16536 deletions

View File

@@ -425,13 +425,14 @@ function getRgArgs(query: TextSearchQuery, options: TextSearchOptions): string[]
args.push('--pcre2');
}
if (query.isRegExp) {
query.pattern = unicodeEscapesToPCRE2(query.pattern);
}
// Allow $ to match /r/n
args.push('--crlf');
if (query.isRegExp) {
query.pattern = unicodeEscapesToPCRE2(query.pattern);
args.push('--auto-hybrid-regex');
}
let searchPatternAfterDoubleDashes: Maybe<string>;
if (query.isWordMatch) {
const regexp = createRegExp(query.pattern, !!query.isRegExp, { wholeWord: query.isWordMatch });
@@ -441,7 +442,6 @@ function getRgArgs(query: TextSearchQuery, options: TextSearchOptions): string[]
let fixedRegexpQuery = fixRegexNewline(query.pattern);
fixedRegexpQuery = fixNewline(fixedRegexpQuery);
args.push('--regexp', fixedRegexpQuery);
args.push('--auto-hybrid-regex');
} else {
searchPatternAfterDoubleDashes = query.pattern;
args.push('--fixed-strings');