code: function doSearch(editor, searchBackwards) {
          var state = getSearchState(editor._codeMirror);
  
          if (state.parsedQuery) {
              findNext(editor, searchBackwards);
          } else {
              openSearchBar(editor, false);
          }
      }
docs: If no search pending, opens the Find dialog. If search bar already open, moves to
  next/prev result (depending on 'searchBackwards')