We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eb1588 commit 5c6025aCopy full SHA for 5c6025a
addon/search/search.js
@@ -62,7 +62,21 @@
62
value: deflt,
63
selectValueOnOpen: true,
64
closeOnEnter: false,
65
- onClose: function() { clearSearch(cm); }
+ onClose: function() { clearSearch(cm); },
66
+ onKeyDown: function(ev, query) {
67
+ var cmd = CodeMirror.keyMap['default'][CodeMirror.keyName(ev)];
68
+ if (cmd) {
69
+ var nextSearchCmds = ['findNext', 'findPrev'];
70
+ var searchCmds = ['find', 'findPersistent'];
71
+ if (nextSearchCmds.indexOf(cmd) !== -1) {
72
+ startSearch(cm, getSearchState(cm), query);
73
+ CodeMirror.commands[cmd](cm);
74
+ CodeMirror.e_stop(ev);
75
+ } else if (searchCmds.indexOf(cmd) !== -1) {
76
+ f(query, ev);
77
+ }
78
79
80
});
81
}
82
0 commit comments