I tried adding outline to the .selectionMatch
class:
".cm-selectionMatch": {
outline: `${color.highlight} solid 1px`,
backgroundColor: 'transparent'
},
The result looks like CodeMirror
- considers contiguous matches as merged so it doesn’t merge them (when selection changes from
o
tooo
, there should be 3oo
highlights) - the opposite, when some maches need splitting it doesn’t split them (when selection changes from
oo
too
, there’re 2oo
highlights left, expects 0).
Comparing with Sublime Text: