Skip to content

Commit

Permalink
fix: search box updateCounter
Browse files Browse the repository at this point in the history
  • Loading branch information
sekedus committed Nov 22, 2024
1 parent d530af2 commit 318dd9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ext/searchbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ class SearchBox {
* Convert all line ending variations to Unix-style = \n
* Windows (\r\n), MacOS Classic (\r), and Unix (\n)
*/
if (editor.$search.$isMultilineSearch(editor.getLastSearchOptions()))
if (editor.$search.$isMultilineSearch(editor.getLastSearchOptions())) {
value = value.replace(/\r\n|\r|\n/g, "\n");
editor.session.doc.$autoNewLine = "\n";
}

var offset = editor.session.doc.positionToIndex(editor.selection.anchor);
if (this.searchRange)
Expand Down

0 comments on commit 318dd9a

Please sign in to comment.