Skip to content

Commit dabc713

Browse files
committed
fix: reset search match counter when switching files (issue processing#3361)
1 parent 8c52e95 commit dabc713

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/utils/codemirror-search.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ function SearchState() {
5252
this.caseInsensitive = true;
5353
this.wholeWord = false;
5454
this.replaceStarted = false;
55-
this.lastFileName = 'sketch.js';
55+
this.lastFileName =
56+
document.querySelector('.editor__file-name span')?.innerText || null;
5657
}
5758

5859
function getSearchState(cm) {

0 commit comments

Comments
 (0)