Skip to content
Snippets Groups Projects
Commit c4390fb0 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[search addon] Reset search position when starting a new persistent search

Closes #3920
parent ea6382a7
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,10 @@
persistentDialog(cm, queryDialog, q, function(query, event) {
CodeMirror.e_stop(event);
if (!query) return;
if (query != state.queryText) startSearch(cm, state, query);
if (query != state.queryText) {
startSearch(cm, state, query);
state.posFrom = state.posTo = cm.getCursor();
}
if (hiding) hiding.style.opacity = 1
findNext(cm, event.shiftKey, function(_, to) {
var dialog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment