未验证 提交 73b5307a 编写于 作者: A Alexandru Dima 提交者: GitHub

Merge pull request #95830 from dustypomerleau/hl

change all instances of `wordHighligher` to `wordHighlighter`
......@@ -483,20 +483,20 @@ class WordHighlighterContribution extends Disposable implements IEditorContribut
return editor.getContribution<WordHighlighterContribution>(WordHighlighterContribution.ID);
}
private wordHighligher: WordHighlighter | null;
private wordHighlighter: WordHighlighter | null;
constructor(editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService) {
super();
this.wordHighligher = null;
this.wordHighlighter = null;
const createWordHighlighterIfPossible = () => {
if (editor.hasModel()) {
this.wordHighligher = new WordHighlighter(editor, contextKeyService);
this.wordHighlighter = new WordHighlighter(editor, contextKeyService);
}
};
this._register(editor.onDidChangeModel((e) => {
if (this.wordHighligher) {
this.wordHighligher.dispose();
this.wordHighligher = null;
if (this.wordHighlighter) {
this.wordHighlighter.dispose();
this.wordHighlighter = null;
}
createWordHighlighterIfPossible();
}));
......@@ -504,34 +504,34 @@ class WordHighlighterContribution extends Disposable implements IEditorContribut
}
public saveViewState(): boolean {
if (this.wordHighligher && this.wordHighligher.hasDecorations()) {
if (this.wordHighlighter && this.wordHighlighter.hasDecorations()) {
return true;
}
return false;
}
public moveNext() {
if (this.wordHighligher) {
this.wordHighligher.moveNext();
if (this.wordHighlighter) {
this.wordHighlighter.moveNext();
}
}
public moveBack() {
if (this.wordHighligher) {
this.wordHighligher.moveBack();
if (this.wordHighlighter) {
this.wordHighlighter.moveBack();
}
}
public restoreViewState(state: boolean | undefined): void {
if (this.wordHighligher && state) {
this.wordHighligher.restore();
if (this.wordHighlighter && state) {
this.wordHighlighter.restore();
}
}
public dispose(): void {
if (this.wordHighligher) {
this.wordHighligher.dispose();
this.wordHighligher = null;
if (this.wordHighlighter) {
this.wordHighlighter.dispose();
this.wordHighlighter = null;
}
super.dispose();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册