Reset active line

Hi everyone!

I use highlightActiveLine extension from basicSetup.
When focus moves away from the editor, the last active line remains highlighted, it’s ok.

But in some cases I need to remove highlighting from all lines in unfocused editor. Is it posible to do it programmatically?
(Not with CSS, like here)

Not with highlightActiveLine – that simply always styles the line with the cursor, and doesn’t have an ‘off’ state.

But if we have unfocused editor, there is no cursor at all.
How does it work?

Thanks for the quick response, as always!

The editor always keeps a selection position in its state, it just doesn’t draw the cursor when not focused.

1 Like