Skip to content

Commit

Permalink
Desktop: Fix bug where editor would scroll to focus global search (#3787
Browse files Browse the repository at this point in the history
)
  • Loading branch information
CalebJohn authored Sep 22, 2020
1 parent 5226f00 commit 7202066
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export default function useEditorSearch(CodeMirror: any) {
// We only want to highlight all matches when there is only 1 search term
if (keywords.length !== 1 || keywords[0].value == '') {
clearOverlay(this);
setPreviousKeywordValue('');
const prev = keywords.length > 1 ? keywords[0].value : '';
setPreviousKeywordValue(prev);
return 0;
}

Expand Down

0 comments on commit 7202066

Please sign in to comment.