MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / updateSearchQuery

Function updateSearchQuery

lib/web/CodeMirror/keymap/vim.js:4345–4360  ·  view source on GitHub ↗
(cm, rawQuery, ignoreCase, smartCase)

Source from the content-addressed store, hash-verified

4343 }
4344 // Returns true if the query is valid.
4345 function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
4346 if (!rawQuery) {
4347 return;
4348 }
4349 var state = getSearchState(cm);
4350 var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);
4351 if (!query) {
4352 return;
4353 }
4354 highlightSearchMatches(cm, query);
4355 if (regexEqual(query, state.getQuery())) {
4356 return query;
4357 }
4358 state.setQuery(query);
4359 return query;
4360 }
4361 function searchOverlay(query) {
4362 if (query.source.charAt(0) == '^') {
4363 var matchSol = true;

Callers 4

handleQueryFunction · 0.85
onPromptKeyUpFunction · 0.85
onPromptKeyDownFunction · 0.85
VimFunction · 0.85

Calls 4

highlightSearchMatchesFunction · 0.85
regexEqualFunction · 0.85
getSearchStateFunction · 0.70
parseQueryFunction · 0.70

Tested by

no test coverage detected