marijnh/CodeMirror — pull request #1572 by danielfaust (2013-06-05 09:07:16+00:00)
Title: Update search.js

The variable "query" only contains the string version of the query, even if a regex has been submitted. "state.query" contains either a regex object or a string, depending on the input.
The function searchOverlay contains the neccessary logic to differientiate between these two types, indicating that the original purpose of it was that regexes should be highlighted accordingly.
Passing the "query" variable to searchOverlay fails to highlight regexes, for example case insensitive searches, and thus isn't in sync with the find next / find previous commands.