PackageTrack

npm

@codemirror/search

6.7.1codemirror/search

Search functionality for the CodeMirror code editor

Release timeline

44 releases since 2020
20202026

One column per quarter.

Releases

  1. 6.7.116 Jun 2026
    Release notes2 sources agree

    Bug fixes

    Fix a regression in 6.7.0 that caused replaceNext to not immediately move to the next match when replacing.

    Open source →
  2. 6.7.021 Apr 2026
    Release notes2 sources agree

    Bug fixes

    SearchCursor will no longer ignore matches that don't start or end on non-normalized character boundaries.

    New features

    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.

    Open source →
  3. 6.6.013 Jan 2026
    Release notes2 sources agree

    New features

    Search queries now support a generic test field that can be used to implement custom tests on matches.

    Open source →
  4. 6.5.1114 May 2025
    Release notes2 sources agree

    Bug fixes

    Fix an issue in replaceNext that could cause it to create an invalid selection when replacing past the end of the document.

    Open source →
  5. 6.5.1026 Feb 2025
    Release notes2 sources agree

    Bug fixes

    Add a close button to the gotoLine panel.

    Open source →
  6. 6.5.912 Feb 2025
    Release notes2 sources agree

    Bug fixes

    When replacing a regexp match, don't expand multi-digit replacement markers to numbers beyond the captured group count in the query.

    Open source →
  7. 6.5.822 Nov 2024
    Release notes2 sources agree

    Bug fixes

    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.

    Open source →
  8. 6.5.71 Nov 2024
    Release notes2 sources agree

    Bug fixes

    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.

    Open source →
  9. 6.5.67 Feb 2024
    Release notes2 sources agree

    Bug fixes

    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.

    Open source →
  10. 6.5.527 Nov 2023
    Release notes2 sources agree

    Bug fixes

    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.

    Open source →
  11. 6.5.420 Sept 2023
    Release notes2 sources agree

    Bug fixes

    Fix a bug that caused whole-word search to incorrectly check for word boundaries in some circumstances.

    Open source →
  12. 6.5.314 Sept 2023
    Release notes2 sources agree

    Bug fixes

    The gotoLine dialog is now populated with the current line number when you open it.

    Open source →
  13. 6.5.226 Aug 2023
    Release notes2 sources agree

    Bug fixes

    Don't use the very lowest precedence for match highlighting decorations.

    Open source →
  14. 6.5.14 Aug 2023
    Release notes2 sources agree

    Bug fixes

    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.

    Open source →
  15. 6.5.05 Jun 2023
    Release notes2 sources agree

    New features

    The new regexp option to search can be used to control whether queries have the regexp flag on by default.

    Open source →
  16. 6.4.025 Apr 2023
    Release notes2 sources agree

    Bug fixes

    The findNext and findPrevious commands now select the search field text if that field is focused.

    New features

    The scrollToMatch callback option now receives the editor view as a second parameter.

    Open source →
  17. 6.3.020 Mar 2023
    Release notes2 sources agree

    New features

    The new scrollToMatch search option allows you to adjust the way the editor scrolls search matches into view.

    Open source →
  18. 6.2.314 Nov 2022
    Release notes2 sources agree

    Bug fixes

    Fix a bug that hid the search dialog's close button when the editor was read-only.

    Open source →
  19. 6.2.218 Oct 2022
    Release notes2 sources agree

    Bug fixes

    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.

    Open source →
  20. 6.2.126 Sept 2022
    Release notes2 sources agree

    Bug fixes

    By-word search queries will now skip any result that had word characters both before and after a match boundary.

    Open source →
  21. 6.2.025 Aug 2022
    Release notes2 sources agree

    New features

    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.

    Open source →
  22. 6.1.016 Aug 2022
    Release notes2 sources agree

    Bug fixes

    Fix an infinite loop when the match position of a RegExpCursor ended up in the middle of an UTF16 surrogate pair.

    New features

    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.

    Open source →
  23. 6.0.122 Jul 2022
    Release notes2 sources agree

    Bug fixes

    findNext and findPrevious will now return to the current result (and scroll it into view) if no other matches are found.

    Open source →
  24. 6.0.08 Jun 2022
    Release notes2 sources agree

    Bug fixes

    Don't crash when a custom search panel doesn't have a field named 'search'.

    Make sure replacements are announced to screen readers.

    Open source →
  25. 0.20.122 Apr 2022
    Release notes2 sources agree

    New features

    It is now possible to disable backslash escapes in search queries with the literal option.

    Open source →
  26. 0.20.020 Apr 2022
    Release notes2 sources agree

    Bug fixes

    Make the wholeWords option to highlightSelectionMatches default to false, as intended.

    Open source →
  27. 0.19.104 Apr 2022
    Release notes2 sources agree

    Bug fixes

    Make sure search matches are highlighted when scrolling new content into view.

    Open source →
  28. 0.19.93 Mar 2022
    Release notes2 sources agree

    New features

    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.

    Open source →
  29. 0.19.814 Feb 2022
    Release notes2 sources agree

    Bug fixes

    Fix a bug that caused the search panel to start open when configuring a state with the search() extension.

    Open source →
  30. 0.19.714 Feb 2022
    Release notes2 sources agree

    Breaking changes

    searchConfig is deprecated in favor of search (but will exist until next major release).

    New features

    The new search function is now used to enable and configure the search extension.

    Open source →
  31. 0.19.627 Jan 2022
    Release notes2 sources agree

    Bug fixes

    Make selectNextOccurrence scroll the newly selected range into view.

    Open source →
  32. 0.19.516 Dec 2021
    Release notes2 sources agree

    Breaking changes

    The search option matchCase was renamed to caseSensitive (the old name will continue to work until the next breaking release).

    Bug fixes

    openSearchPanel will now update the search query to the current selection even if the panel was already open.

    New features

    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.

    Open source →
  33. 0.19.42 Dec 2021
    Release notes2 sources agree

    Bug fixes

    The search panel will no longer show the replace interface when the editor is read-only.

    Open source →
  34. 0.19.322 Nov 2021
    Release notes2 sources agree

    Bug fixes

    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.

    New features

    Add a Symbol.iterator property to the cursor types, so that they can be used with for/of.

    Open source →
  35. 0.19.216 Sept 2021
    Release notes2 sources agree

    Bug fixes

    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.

    Open source →
  36. 0.19.16 Sept 2021
    Release notes2 sources agree

    Bug fixes

    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)

    New features

    The searchConfig function now takes a matchCase option that controls whether the search panel starts in case-sensitive mode.

    Open source →
  37. 0.19.011 Aug 2021
    Release notes2 sources agree

    Bug fixes

    Make sure to prevent the native Mod-d behavior so that the editor doesn't lose focus after selecting past the last occurrence.

    Open source →
  38. 0.18.427 May 2021
    Release notes2 sources agree

    New features

    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.

    Open source →
  39. 0.18.318 May 2021
    Release notes2 sources agree

    Bug fixes

    Fix a bug where the first search command in a new editor wouldn't properly open the panel.

    New features

    New command selectNextOccurrence that selects the next occurrence of the selected word (bound to Mod-d in the search keymap).

    Open source →
  40. 0.18.219 Mar 2021
    Release notes2 sources agree

    Bug fixes

    The search interface and cursor will no longer include overlapping matches (aligning with what all other editors are doing).

    New features

    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.

    Open source →
  41. 0.18.115 Mar 2021
    Release notes2 sources agree

    Bug fixes

    Fix an issue where entering an invalid input in the goto-line dialog would submit a form and reload the page.

    Open source →
  42. 0.18.03 Mar 2021
    Release notes2 sources agree

    Breaking changes

    Update dependencies to 0.18.

    Open source →
  43. 0.17.16 Jan 2021
    Release notes2 sources agree

    New features

    The package now also exports a CommonJS module.

    Open source →
  44. 0.17.029 Dec 2020
    Release notes2 sources agree

    Breaking changes

    First numbered release.

    Open source →