diff --git a/client/utils/codemirror-search.js b/client/utils/codemirror-search.js index 9c8b69e1..6e904656 100644 --- a/client/utils/codemirror-search.js +++ b/client/utils/codemirror-search.js @@ -73,6 +73,8 @@ export default function(CodeMirror) { CodeMirror.on(searchField, "keyup", function (e) { if (e.keyCode !== 13 && searchField.value.length > 1) { // not enter and more than 1 character to search startSearch(cm, getSearchState(cm), searchField.value); + } else if (searchField.value.length <= 1) { + cm.display.wrapper.querySelector('.CodeMirror-search-results').innerText = ''; } }); @@ -260,6 +262,7 @@ export default function(CodeMirror) {