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

Function handleQuery

lib/web/CodeMirror/keymap/vim.js:1372–1387  ·  view source on GitHub ↗
(query, ignoreCase, smartCase)

Source from the content-addressed store, hash-verified

1370 var originalQuery = getSearchState(cm).getQuery();
1371 var originalScrollPos = cm.getScrollInfo();
1372 function handleQuery(query, ignoreCase, smartCase) {
1373 vimGlobalState.searchHistoryController.pushInput(query);
1374 vimGlobalState.searchHistoryController.reset();
1375 try {
1376 updateSearchQuery(cm, query, ignoreCase, smartCase);
1377 } catch (e) {
1378 showConfirm(cm, 'Invalid regex: ' + query);
1379 clearInputState(cm);
1380 return;
1381 }
1382 commandDispatcher.processMotion(cm, vim, {
1383 type: 'motion',
1384 motion: 'findNext',
1385 motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist }
1386 });
1387 }
1388 function onPromptClose(query) {
1389 cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
1390 handleQuery(query, true /** ignoreCase */, true /** smartCase */);

Callers 2

onPromptCloseFunction · 0.85
VimFunction · 0.85

Calls 4

updateSearchQueryFunction · 0.85
showConfirmFunction · 0.85
clearInputStateFunction · 0.85
resetMethod · 0.65

Tested by

no test coverage detected