Skip to content

Commit

Permalink
[gui] Highlight occurences of the selected text
Browse files Browse the repository at this point in the history
Search and highlight occurrences of the selected text.
  • Loading branch information
csordasmarton committed Nov 9, 2020
1 parent 988c26a commit 4807627
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 10 additions & 1 deletion web/server/vue-cli/src/components/Report/Report.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ export default {
mode: "text/x-c++src",
gutters: [ "CodeMirror-linenumbers", "bugInfo" ],
extraKeys: {},
viewportMargin: 500
viewportMargin: 500,
highlightSelectionMatches : { showToken: /\w/, annotateScrollbar: true }
});
this.editor.setSize("100%", "100%");
Expand Down Expand Up @@ -708,6 +709,14 @@ export default {
.editor {
font-size: initial;
line-height: initial;
::v-deep .cm-matchhighlight {
background-color: lightgreen;
}
::v-deep .CodeMirror-selection-highlight-scrollbar {
background-color: green;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions web/server/vue-cli/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ if (!Error.captureStackTrace) {
import "@mdi/font/css/materialdesignicons.css";
import "codemirror/lib/codemirror.css";
import "codemirror/mode/clike/clike.js";
import "codemirror/addon/scroll/annotatescrollbar.js";
import "codemirror/addon/search/match-highlighter.js";
import "codemirror/addon/search/matchesonscrollbar.js";

import "splitpanes/dist/splitpanes.css";

import Vue from "vue";
Expand Down

0 comments on commit 4807627

Please sign in to comment.