mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-23 13:20:30 -04:00
Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 (#6516)
* Merge from vscode 2cfc8172e533e50c90e6a3152f6bfb1f82f963f3 * fix tests
This commit is contained in:
@@ -112,7 +112,8 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
|
||||
searchScope: null,
|
||||
matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, false),
|
||||
wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, false),
|
||||
isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false)
|
||||
isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false),
|
||||
preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, false)
|
||||
}, false);
|
||||
|
||||
if (shouldRestartFind) {
|
||||
@@ -170,13 +171,17 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
|
||||
if (e.matchCase) {
|
||||
this._storageService.store('editor.matchCase', this._state.actualMatchCase, StorageScope.WORKSPACE);
|
||||
}
|
||||
if (e.preserveCase) {
|
||||
this._storageService.store('editor.preserveCase', this._state.actualPreserveCase, StorageScope.WORKSPACE);
|
||||
}
|
||||
}
|
||||
|
||||
private loadQueryState() {
|
||||
this._state.change({
|
||||
matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, this._state.matchCase),
|
||||
wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, this._state.wholeWord),
|
||||
isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex)
|
||||
isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex),
|
||||
preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, this._state.preserveCase)
|
||||
}, false);
|
||||
}
|
||||
|
||||
@@ -217,6 +222,11 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
|
||||
}
|
||||
}
|
||||
|
||||
public togglePreserveCase(): void {
|
||||
this._state.change({ preserveCase: !this._state.preserveCase }, false);
|
||||
this.highlightFindOptions();
|
||||
}
|
||||
|
||||
public toggleSearchScope(): void {
|
||||
if (this._state.searchScope) {
|
||||
this._state.change({ searchScope: null }, true);
|
||||
|
||||
Reference in New Issue
Block a user