mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-23 21:30:29 -04:00
Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)
This commit is contained in:
@@ -374,8 +374,8 @@ export class CommonFindController extends Disposable implements editorCommon.IEd
|
||||
|
||||
export class FindController extends CommonFindController implements IFindController {
|
||||
|
||||
private _widget: FindWidget;
|
||||
private _findOptionsWidget: FindOptionsWidget;
|
||||
private _widget: FindWidget | null;
|
||||
private _findOptionsWidget: FindOptionsWidget | null;
|
||||
|
||||
constructor(
|
||||
editor: ICodeEditor,
|
||||
@@ -387,6 +387,8 @@ export class FindController extends CommonFindController implements IFindControl
|
||||
@optional(IClipboardService) clipboardService: IClipboardService
|
||||
) {
|
||||
super(editor, _contextKeyService, storageService, clipboardService);
|
||||
this._widget = null;
|
||||
this._findOptionsWidget = null;
|
||||
}
|
||||
|
||||
protected _start(opts: IFindStartOptions): void {
|
||||
@@ -394,7 +396,7 @@ export class FindController extends CommonFindController implements IFindControl
|
||||
this._createFindWidget();
|
||||
}
|
||||
|
||||
if (!this._widget.getPosition() && this._editor.getConfiguration().contribInfo.find.autoFindInSelection) {
|
||||
if (!this._widget!.getPosition() && this._editor.getConfiguration().contribInfo.find.autoFindInSelection) {
|
||||
// not visible yet so we need to set search scope if `editor.find.autoFindInSelection` is `true`
|
||||
opts.updateSearchScope = true;
|
||||
}
|
||||
@@ -402,9 +404,9 @@ export class FindController extends CommonFindController implements IFindControl
|
||||
super._start(opts);
|
||||
|
||||
if (opts.shouldFocus === FindStartFocusAction.FocusReplaceInput) {
|
||||
this._widget.focusReplaceInput();
|
||||
this._widget!.focusReplaceInput();
|
||||
} else if (opts.shouldFocus === FindStartFocusAction.FocusFindInput) {
|
||||
this._widget.focusFindInput();
|
||||
this._widget!.focusFindInput();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,9 +415,9 @@ export class FindController extends CommonFindController implements IFindControl
|
||||
this._createFindWidget();
|
||||
}
|
||||
if (this._state.isRevealed) {
|
||||
this._widget.highlightFindOptions();
|
||||
this._widget!.highlightFindOptions();
|
||||
} else {
|
||||
this._findOptionsWidget.highlightFindOptions();
|
||||
this._findOptionsWidget!.highlightFindOptions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user