in package/src/editorExtensions/commandHighlighter.ts [39:59]
private highlightCommandUnderCursor(changeEvent: monaco.editor.ICursorSelectionChangedEvent): void {
// Looks like the user selected a bunch of text. we don't want to highlight the entire command in this case - since highlighting
// the text is more helpful.
if (!changeEvent.selection.isEmpty()) {
this.decorations = this.editor.deltaDecorations(this.decorations, []);
return;
}
const commandRange: monaco.Range = getCurrentCommandRange(
this.editor,
changeEvent.selection.getStartPosition()
);
const decorations: monaco.editor.IModelDeltaDecoration[] = [
{
range: commandRange,
options: KustoCommandHighlighter.CURRENT_COMMAND_HIGHLIGHT,
},
];
this.decorations = this.editor.deltaDecorations(this.decorations, decorations);
}