diff options
author | Rob Lourens <roblourens@gmail.com> | 2018-08-01 08:12:42 +0300 |
---|---|---|
committer | Rob Lourens <roblourens@gmail.com> | 2018-08-01 08:12:42 +0300 |
commit | 377939ac043400e2a18344d9c865b6b13121ea50 (patch) | |
tree | df73ce2ad8b993f98461855458c316aed85979b5 | |
parent | 573d53815e74f8e4a52c2b6665f5ba9a92dbd341 (diff) |
Fix #55556 - include wordSeparators in all search queries, so findTextInFiles can respect isWordMatch correctly
-rw-r--r-- | src/vs/workbench/parts/search/browser/searchView.ts | 1 | ||||
-rw-r--r-- | src/vs/workbench/parts/search/common/queryBuilder.ts | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/vs/workbench/parts/search/browser/searchView.ts b/src/vs/workbench/parts/search/browser/searchView.ts index 85bd5d5d603..fe81d90a0f5 100644 --- a/src/vs/workbench/parts/search/browser/searchView.ts +++ b/src/vs/workbench/parts/search/browser/searchView.ts @@ -1069,7 +1069,6 @@ export class SearchView extends Viewlet implements IViewlet, IPanel { isRegExp: isRegex, isCaseSensitive: isCaseSensitive, isWordMatch: isWholeWords, - wordSeparators: this.configurationService.getValue<ISearchConfiguration>().editor.wordSeparators, isSmartCase: this.configurationService.getValue<ISearchConfiguration>().search.smartCase }; diff --git a/src/vs/workbench/parts/search/common/queryBuilder.ts b/src/vs/workbench/parts/search/common/queryBuilder.ts index 525753bcae8..8d13bef82a3 100644 --- a/src/vs/workbench/parts/search/common/queryBuilder.ts +++ b/src/vs/workbench/parts/search/common/queryBuilder.ts @@ -73,6 +73,8 @@ export class QueryBuilder { if (contentPattern) { this.resolveSmartCaseToCaseSensitive(contentPattern); + + contentPattern.wordSeparators = this.configurationService.getValue<ISearchConfiguration>().editor.wordSeparators; } const query: ISearchQuery = { @@ -88,7 +90,7 @@ export class QueryBuilder { maxResults: options.maxResults, sortByScore: options.sortByScore, cacheKey: options.cacheKey, - contentPattern: contentPattern, + contentPattern, useRipgrep, disregardIgnoreFiles: options.disregardIgnoreFiles || !useIgnoreFiles, disregardExcludeSettings: options.disregardExcludeSettings, |