MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / updateSearchQuery

Function updateSearchQuery

static/js/codemirror/keymap/vim.js:2039–2056  ·  view source on GitHub ↗
(cm, rawQuery, ignoreCase, smartCase)

Source from the content-addressed store, hash-verified

2037 return(false);
2038 }
2039 function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
2040 cm.operation(function() {
2041 var state = getSearchState(cm);
2042 if (!rawQuery) {
2043 return;
2044 }
2045 var query = parseQuery(cm, rawQuery, !!ignoreCase, !!smartCase);
2046 if (!query) {
2047 return;
2048 }
2049 if (regexEqual(query, state.getQuery())) {
2050 return;
2051 }
2052 clearSearchHighlight(cm);
2053 highlightSearchMatches(cm, query);
2054 state.setQuery(query);
2055 });
2056 }
2057 function searchOverlay(query) {
2058 return {
2059 token: function(stream) {

Callers 2

handleQueryFunction · 0.85
VimFunction · 0.85

Calls 6

regexEqualFunction · 0.85
clearSearchHighlightFunction · 0.85
highlightSearchMatchesFunction · 0.85
getSearchStateFunction · 0.70
parseQueryFunction · 0.70
operationMethod · 0.45

Tested by

no test coverage detected