(query, ignoreCase, smartCase)
| 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 */); |
no test coverage detected