_rvidal
September 10, 2025, 1:58pm
1
I’ve noticed that drawSelection()
always extends the selection layer `.cm-selectionBackground`
to cover the whole visual line, for each included line break. This deviates from native behavior (at least on my OS) where the selection stops at the line break:
Could this behavior be customized instead?
marijn
September 10, 2025, 2:44pm
2
No, this isn’t customizable. You could try not including drawSelection
in your configuration and seeing if you like the native selection better.
_rvidal
September 10, 2025, 3:40pm
3
This is for the codemirror-helix extensions, which I believe requires drawSelection()
to have proper multi-cursor.
I’m not particularly bothered by the defaults, it’s just something I noticed b/c I’m trying to reproduce Helix’s look and feeling as much as possible.
Would it be possible to reimplement drawSelection()
? I haven’t checked thoroughly whether it uses some unexposed internals.
marijn
September 10, 2025, 4:29pm
4
Yes, that should absolutely be possible.
1 Like