Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -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();
}
}