Fix search using CodeMirror SearchCursor.