Skip to content

Commit

Permalink
range decorations should check for code editor explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Mar 9, 2020
1 parent 413f1fe commit 39cddc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vs/workbench/browser/parts/editor/rangeDecorations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { IRange } from 'vs/editor/common/core/range';
import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents';
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { ICodeEditor, isCodeEditor } from 'vs/editor/browser/editorBrowser';
import { TrackedRangeStickiness, IModelDecorationsChangeAccessor } from 'vs/editor/common/model';

export interface IRangeHighlightDecoration {
Expand Down Expand Up @@ -41,9 +41,9 @@ export class RangeHighlightDecorations extends Disposable {
this.rangeHighlightDecorationId = null;
}

highlightRange(range: IRangeHighlightDecoration, editor?: ICodeEditor) {
highlightRange(range: IRangeHighlightDecoration, editor?: any) {
editor = editor ? editor : this.getEditor(range);
if (editor) {
if (isCodeEditor(editor)) {
this.doHighlightRange(editor, range);
}
}
Expand Down

0 comments on commit 39cddc9

Please sign in to comment.