Skip to content

Commit 9744420

Browse files
committed
Better name for method
1 parent 0c2038d commit 9744420

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/vs/workbench/contrib/webview/browser/webviewElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
810810
this._send('find', { value, previous });
811811
}
812812

813-
public startFind(value: string) {
813+
public updateFind(value: string) {
814814
if (!value || !this.element) {
815815
return;
816816
}

src/vs/workbench/contrib/webview/browser/webviewFindWidget.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ export interface WebviewFindDelegate {
1414
readonly onDidStopFind: Event<void>;
1515
readonly checkImeCompletionState: boolean;
1616
find(value: string, previous: boolean): void;
17-
startFind(value: string): void;
17+
updateFind(value: string): void;
1818
stopFind(keepSelection?: boolean): void;
1919
focus(): void;
2020
}
2121

2222
export class WebviewFindWidget extends SimpleFindWidget {
23-
protected _findWidgetFocused: IContextKey<boolean>;
23+
24+
protected readonly _findWidgetFocused: IContextKey<boolean>;
2425

2526
constructor(
2627
private readonly _delegate: WebviewFindDelegate,
@@ -53,10 +54,10 @@ export class WebviewFindWidget extends SimpleFindWidget {
5354
this._delegate.focus();
5455
}
5556

56-
public _onInputChanged(): boolean {
57+
protected _onInputChanged(): boolean {
5758
const val = this.inputValue;
5859
if (val) {
59-
this._delegate.startFind(val);
60+
this._delegate.updateFind(val);
6061
} else {
6162
this._delegate.stopFind(false);
6263
}

src/vs/workbench/contrib/webview/electron-sandbox/webviewElement.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ export class ElectronWebviewElement extends WebviewElement {
107107
}
108108

109109
if (!this._findStarted) {
110-
this.startFind(value);
110+
this.updateFind(value);
111111
} else {
112112
// continuing the find, so set findNext to false
113113
const options: FindInFrameOptions = { forward: !previous, findNext: false, matchCase: false };
114114
this._webviewMainService.findInFrame({ windowId: this.nativeHostService.windowId }, this.id, value, options);
115115
}
116116
}
117117

118-
public override startFind(value: string) {
118+
public override updateFind(value: string) {
119119
if (!value || !this.element) {
120120
return;
121121
}

0 commit comments

Comments
 (0)