(cm, rev)
| 63 | }); |
| 64 | } |
| 65 | function findNext(cm, rev) {cm.operation(function() { |
| 66 | var state = getSearchState(cm); |
| 67 | var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo); |
| 68 | if (!cursor.find(rev)) { |
| 69 | cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0)); |
| 70 | if (!cursor.find(rev)) return; |
| 71 | } |
| 72 | cm.setSelection(cursor.from(), cursor.to()); |
| 73 | state.posFrom = cursor.from(); state.posTo = cursor.to(); |
| 74 | });} |
| 75 | function clearSearch(cm) {cm.operation(function() { |
| 76 | var state = getSearchState(cm); |
| 77 | if (!state.query) return; |
no test coverage detected