NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #5811 most downloaded on npm
Search functionality for the CodeMirror code editor
Last release 1 months ago
31 Aug 2026
Release timing varies
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 45 of 45 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
45 releases · first in 2020
One column per quarter.
Calling gotoLine while a go-to-line dialog is already open will now focus the existing dialog rather than opening a second one.
Calling gotoLine while a go-to-line dialog is already open will now focus the existing dialog rather than opening a second one.
Fix a regression in 6.7.0 that caused replaceNext to not immediately move to the next match when replacing.
Fix a regression in 6.7.0 that caused replaceNext to not immediately move to the next match when replacing.
SearchCursor will no longer ignore matches that don't start or end on non-normalized character boundaries.
SearchCursor will no longer ignore matches that don't start or end on non-normalized character boundaries.
SearchCursor results now include a precise field that is false when the query matched normalized content that doesn't start or end on an actual document character boundary.
Search queries now support a generic test field that can be used to implement custom tests on matches.
Search queries now support a generic test field that can be used to implement custom tests on matches.
Fix an issue in replaceNext that could cause it to create an invalid selection when replacing past the end of the document.
Fix an issue in replaceNext that could cause it to create an invalid selection when replacing past the end of the document.
Add a close button to the gotoLine panel.
Add a close button to the gotoLine panel.
When replacing a regexp match, don't expand multi-digit replacement markers to numbers beyond the captured group count in the query.
When replacing a regexp match, don't expand multi-digit replacement markers to numbers beyond the captured group count in the query.
Fix a bug that put the selection in the wrong place after running replaceNext with a regexp query that could match strings of different length.
Fix a bug that put the selection in the wrong place after running replaceNext with a regexp query that could match strings of different length.
Fix an issue where findNext and findPrevious would do nothing when the only match in the document was partially selected.
Fix an issue where findNext and findPrevious would do nothing when the only match in the document was partially selected.
Fix an infinite loop in SearchCursor when the normalizer function deletes characters.
Make highlightSelectionMatches include whitespace in the selection in its matches.
Make highlightSelectionMatches include whitespace in the selection in its matches.
Fix a bug that caused SearchCursor to return invalid ranges when matching astral chars that the the normalizer normalized to single-code-unit chars.
Fix a bug that caused codes like \n to be unescaped in strings inserted via replace placeholders like $&.
Fix a bug that caused codes like \n to be unescaped in strings inserted via replace placeholders like $&.
Use the keybinding Mod-Alt-g for gotoLine to the search keymap, to make it usable for people whose keyboard layout uses Alt/Option-g to type some character.
Fix a bug that caused whole-word search to incorrectly check for word boundaries in some circumstances.
Fix a bug that caused whole-word search to incorrectly check for word boundaries in some circumstances.
The gotoLine dialog is now populated with the current line number when you open it.
The gotoLine dialog is now populated with the current line number when you open it.
Don't use the very lowest precedence for match highlighting decorations.
Don't use the very lowest precedence for match highlighting decorations.
Make gotoLine prefer to scroll the target line to the middle of the view.
Make gotoLine prefer to scroll the target line to the middle of the view.
Fix an issue in SearchCursor where character normalization could produce nonsensical matches.
The new regexp option to search can be used to control whether queries have the regexp flag on by default.
The new regexp option to search can be used to control whether queries have the regexp flag on by default.
The findNext and findPrevious commands now select the search field text if that field is focused.
The findNext and findPrevious commands now select the search field text if that field is focused.
The scrollToMatch callback option now receives the editor view as a second parameter.
The new scrollToMatch search option allows you to adjust the way the editor scrolls search matches into view.
The new scrollToMatch search option allows you to adjust the way the editor scrolls search matches into view.
Fix a bug that hid the search dialog's close button when the editor was read-only.
Fix a bug that hid the search dialog's close button when the editor was read-only.
When literal is off, \n, \r, and \t escapes are now also supported in replacement text.
When literal is off, \n, \r, and \t escapes are now also supported in replacement text.
Make sure search dialog inputs don't get treated as form fields when the editor is created inside a form.
Fix a bug in RegExpCursor that would cause it to stop matching in the middle of a line when its current match position was equal to the length of the line.
By-word search queries will now skip any result that had word characters both before and after a match boundary.
By-word search queries will now skip any result that had word characters both before and after a match boundary.
A new wholeWord search query flag can be used to limit matches to whole words.
A new wholeWord search query flag can be used to limit matches to whole words.
SearchCursor and RegExpCursor now support a test parameter that can be used to ignore certain matches.
Fix an infinite loop when the match position of a RegExpCursor ended up in the middle of an UTF16 surrogate pair.
Fix an infinite loop when the match position of a RegExpCursor ended up in the middle of an UTF16 surrogate pair.
The literal search option can now be set to make literal queries the default.
The new searchPanelOpen function can be used to find out whether the search panel is open for a given state.
findNext and findPrevious will now return to the current result (and scroll it into view) if no other matches are found.
findNext and findPrevious will now return to the current result (and scroll it into view) if no other matches are found.
Don't crash when a custom search panel doesn't have a field named 'search'.
Don't crash when a custom search panel doesn't have a field named 'search'.
Make sure replacements are announced to screen readers.
It is now possible to disable backslash escapes in search queries with the literal option.
It is now possible to disable backslash escapes in search queries with the literal option.
Make the wholeWords option to highlightSelectionMatches default to false, as intended.
Make the wholeWords option to highlightSelectionMatches default to false, as intended.
Make sure search matches are highlighted when scrolling new content into view.
Make sure search matches are highlighted when scrolling new content into view.
The selection-matching extension now accepts a wholeWords option that makes it only highlight matches that span a whole word. Add SearchQuery.getCurso
The selection-matching extension now accepts a wholeWords option that makes it only highlight matches that span a whole word. Add SearchQuery.getCursor
The SearchQuery class now has a getCursor method that allows external code to create a cursor for the query.
Fix a bug that caused the search panel to start open when configuring a state with the search() extension.
Fix a bug that caused the search panel to start open when configuring a state with the search() extension.
searchConfig is deprecated in favor of search (but will exist until next major release).
searchConfig is deprecated in favor of search (but will exist until next major release).
The new search function is now used to enable and configure the search extension.
Make selectNextOccurrence scroll the newly selected range into view.
Make selectNextOccurrence scroll the newly selected range into view.
The search option matchCase was renamed to caseSensitive (the old name will continue to work until the next breaking release).
The search option matchCase was renamed to caseSensitive (the old name will continue to work until the next breaking release).
openSearchPanel will now update the search query to the current selection even if the panel was already open.
Client code can now pass a custom search panel creation function in the search configuration.
The getSearchQuery function and setSearchQuery effect can now be used to inspect or change the current search query.
The search panel will no longer show the replace interface when the editor is read-only.
The search panel will no longer show the replace interface when the editor is read-only.
Add userEvent annotations to search and replace transactions.
Add userEvent annotations to search and replace transactions.
Make sure the editor handles keys bound to findNext/findPrevious even when there are no matches, to avoid the browser's search interrupting users.
Add a Symbol.iterator property to the cursor types, so that they can be used with for/of.
selectNextOccurrence will now only select partial words if the current main selection hold a partial word.
selectNextOccurrence will now only select partial words if the current main selection hold a partial word.
Explicitly set the button's type to prevent the browser from submitting forms wrapped around the editor.
Make highlightSelectionMatches not produce overlapping decorations, since those tend to just get unreadable.
Make highlightSelectionMatches not produce overlapping decorations, since those tend to just get unreadable.
Make sure any existing search text is selected when opening the search panel. Add search config option to not match case when search panel is opened (#4)
The searchConfig function now takes a matchCase option that controls whether the search panel starts in case-sensitive mode.
Make sure to prevent the native Mod-d behavior so that the editor doesn't lose focus after selecting past the last occurrence.
Make sure to prevent the native Mod-d behavior so that the editor doesn't lose focus after selecting past the last occurrence.
Initialize the search query to the current selection, when there is one, when opening the search dialog.
Initialize the search query to the current selection, when there is one, when opening the search dialog.
Add a searchConfig function, supporting an option to put the search panel at the top of the editor.
Fix a bug where the first search command in a new editor wouldn't properly open the panel.
Fix a bug where the first search command in a new editor wouldn't properly open the panel.
New command selectNextOccurrence that selects the next occurrence of the selected word (bound to Mod-d in the search keymap).
The search interface and cursor will no longer include overlapping matches (aligning with what all other editors are doing).
The search interface and cursor will no longer include overlapping matches (aligning with what all other editors are doing).
The package now exports a RegExpCursor which is a search cursor that matches regular expression patterns.
The search/replace interface now allows the user to use regular expressions.
The SearchCursor class now has a nextOverlapping method that includes matches that start inside the previous match.
Basic backslash escapes (\n, \r, \t, and \) are now accepted in string search patterns in the UI.
Fix an issue where entering an invalid input in the goto-line dialog would submit a form and reload the page.
Fix an issue where entering an invalid input in the goto-line dialog would submit a form and reload the page.
### Breaking changes Update dependencies to 0.18.
Update dependencies to 0.18.
The package now also exports a CommonJS module.
The package now also exports a CommonJS module.
### Breaking changes First numbered release.
First numbered release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →