I would like to add/remove highlight for line (or text region) from my code.
I’m able to do this by modifying
editorView.lineElementForScreenRow(lineNo) ( add ‘my-highlight’ class for example ), but because line elements are rebuilt at scroll this change is temporary.
Can someone point me how to do it properly? How normal selection is implemented? It looks like it’s some kind of absolutely positioned overlay but I can’t find it in the tree.
I’ve seen highlight-line package but I want to have custom style for arbitrary line number, not only selected line and torn on/off this programmatically