@@ -31,7 +31,7 @@ function SearchState() {
3131 * @memberof utils/source-search
3232 * @static
3333 */
34- function getSearchState ( cm : any , query , modifiers ) {
34+ function getSearchState ( cm : any , query ) {
3535 const state = cm . state . search || ( cm . state . search = new SearchState ( ) ) ;
3636 return state ;
3737}
@@ -141,11 +141,11 @@ function doSearch(ctx, rev, query, keepSelection, modifiers: SearchModifiers) {
141141
142142 return cm . operation ( function ( ) {
143143 if ( ! query || isWhitespace ( query ) ) {
144- clearSearch ( cm , query , modifiers ) ;
144+ clearSearch ( cm , query ) ;
145145 return ;
146146 }
147147
148- const state = getSearchState ( cm , query , modifiers ) ;
148+ const state = getSearchState ( cm , query ) ;
149149 const isNewQuery = state . query !== query ;
150150 state . query = query ;
151151
@@ -175,7 +175,7 @@ function searchNext(ctx, rev, query, newQuery, modifiers) {
175175 const { cm, ed } = ctx ;
176176 let nextMatch ;
177177 cm . operation ( function ( ) {
178- const state = getSearchState ( cm , query , modifiers ) ;
178+ const state = getSearchState ( cm , query ) ;
179179 const pos = getCursorPos ( newQuery , rev , state ) ;
180180
181181 if ( ! state . query ) {
@@ -214,12 +214,8 @@ function searchNext(ctx, rev, query, newQuery, modifiers) {
214214 * @memberof utils/source-search
215215 * @static
216216 */
217- export function removeOverlay (
218- ctx : any ,
219- query : string ,
220- modifiers : SearchModifiers
221- ) {
222- const state = getSearchState ( ctx . cm , query , modifiers ) ;
217+ export function removeOverlay ( ctx : any , query : string ) {
218+ const state = getSearchState ( ctx . cm , query ) ;
223219 ctx . cm . removeOverlay ( state . overlay ) ;
224220 const { line, ch } = ctx . cm . getCursor ( ) ;
225221 ctx . cm . doc . setSelection ( { line, ch } , { line, ch } , { scroll : false } ) ;
@@ -231,8 +227,8 @@ export function removeOverlay(
231227 * @memberof utils/source-search
232228 * @static
233229 */
234- function clearSearch ( cm , query : string , modifiers : SearchModifiers ) {
235- const state = getSearchState ( cm , query , modifiers ) ;
230+ function clearSearch ( cm , query : string ) {
231+ const state = getSearchState ( cm , query ) ;
236232
237233 state . results = [ ] ;
238234
@@ -255,7 +251,7 @@ export function find(
255251 keepSelection : boolean ,
256252 modifiers : SearchModifiers
257253) {
258- clearSearch ( ctx . cm , query , modifiers ) ;
254+ clearSearch ( ctx . cm , query ) ;
259255 return doSearch ( ctx , false , query , keepSelection , modifiers ) ;
260256}
261257
0 commit comments