(cm)
| 2134 | return cursor.from(); |
| 2135 | });} |
| 2136 | function clearSearchHighlight(cm) { |
| 2137 | if (cm.addOverlay) { |
| 2138 | cm.removeOverlay(getSearchState(cm).getOverlay()); |
| 2139 | getSearchState(cm).setOverlay(null); |
| 2140 | } else { |
| 2141 | cm.operation(function() { |
| 2142 | var state = getSearchState(cm); |
| 2143 | if (!state.getQuery()) { |
| 2144 | return; |
| 2145 | } |
| 2146 | var marked = state.getMarked(); |
| 2147 | if (!marked) { |
| 2148 | return; |
| 2149 | } |
| 2150 | for (var i = 0; i < marked.length; ++i) { |
| 2151 | marked[i].clear(); |
| 2152 | } |
| 2153 | state.setMarked(null); |
| 2154 | }); |
| 2155 | } |
| 2156 | } |
| 2157 | /** |
| 2158 | * Check if pos is in the specified range, INCLUSIVE. |
| 2159 | * Range can be specified with 1 or 2 arguments. |
no test coverage detected