Fix: match-highlighter-helper only works in token mode
This commit is contained in:
parent
d4eee828a0
commit
8a10d5bef1
|
@ -42,6 +42,11 @@ const cmFactory = (() => {
|
||||||
} else {
|
} else {
|
||||||
cm.setOption('highlightSelectionMatches', null);
|
cm.setOption('highlightSelectionMatches', null);
|
||||||
}
|
}
|
||||||
|
if (value) {
|
||||||
|
cm.display.wrapper.dataset.matchHighlight = value;
|
||||||
|
} else {
|
||||||
|
delete cm.display.wrapper.dataset.matchHighlight;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
CodeMirror.defineOption('selectByTokens', prefs.get('editor.selectByTokens'), (cm, value) => {
|
CodeMirror.defineOption('selectByTokens', prefs.get('editor.selectByTokens'), (cm, value) => {
|
||||||
|
|
|
@ -364,7 +364,8 @@ input:invalid {
|
||||||
.resize-grip-enabled .CodeMirror-scrollbar-filler {
|
.resize-grip-enabled .CodeMirror-scrollbar-filler {
|
||||||
bottom: 7px; /* make space for resize-grip */
|
bottom: 7px; /* make space for resize-grip */
|
||||||
}
|
}
|
||||||
.cm-matchhighlight-approved .cm-matchhighlight,
|
[data-match-highlight=token].cm-matchhighlight-approved .cm-matchhighlight,
|
||||||
|
[data-match-highlight=selection] .cm-matchhighlight,
|
||||||
.CodeMirror-selection-highlight-scrollbar {
|
.CodeMirror-selection-highlight-scrollbar {
|
||||||
animation: fadein-match-highlighter 1s cubic-bezier(.97,.01,.42,.98);
|
animation: fadein-match-highlighter 1s cubic-bezier(.97,.01,.42,.98);
|
||||||
animation-fill-mode: both;
|
animation-fill-mode: both;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user