Skip to content

Commit 1b7766e

Browse files
authored
Merge pull request #3471 from Jatin24062005/Jatin-Issue#3470
fixing Search Auto-Update After Content Changes Dynamically
2 parents c8fba25 + 3bbfc5f commit 1b7766e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/utils/codemirror-search.js

+6
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,12 @@ function doSearch(cm, rev, persistent, immediate, ignoreQuery) {
515515
startSearch(cm, state, q);
516516
findNext(cm, rev);
517517
}
518+
cm.on('change', function () {
519+
var state = getSearchState(cm);
520+
if (state.query) {
521+
startSearch(cm, state, state.queryText);
522+
}
523+
});
518524
} else {
519525
dialog(cm, queryDialog, 'Search for:', q, function (query) {
520526
if (query && !state.query)

0 commit comments

Comments
 (0)