diff --git a/lib/note-content-editor.tsx b/lib/note-content-editor.tsx index 4ec6d0f77..f141990ac 100644 --- a/lib/note-content-editor.tsx +++ b/lib/note-content-editor.tsx @@ -125,6 +125,10 @@ class NoteContentEditor extends Component { contentDiv = createRef(); decorations: string[] = []; matchesInNote: [] = []; + overviewRuler = { + color: '#3361cc', + position: Editor.OverviewRulerLane.Full, + }; state: OwnState = { content: '', @@ -443,10 +447,7 @@ class NoteContentEditor extends Component { matches.push({ options: { inlineClassName: 'search-decoration', - overviewRuler: { - color: '#3361cc', - position: Editor.OverviewRulerLane.Full, - }, + overviewRuler: this.overviewRuler, }, range: { startLineNumber: start.lineNumber, @@ -1137,12 +1138,18 @@ class NoteContentEditor extends Component { if (match.range === range) { decoration = { range: match.range, - options: { inlineClassName: 'selected-search' }, + options: { + inlineClassName: 'selected-search', + overviewRuler: this.overviewRuler, + }, }; } else { decoration = { range: match.range, - options: { inlineClassName: 'search-decoration' }, + options: { + inlineClassName: 'search-decoration', + overviewRuler: this.overviewRuler, + }, }; } newDecorations.push(decoration);