Skip to content

Commit 506783b

Browse files
authored
move lines from search pair function
1 parent 5747057 commit 506783b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

indent/javascript.vim

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@ let s:syng_strcom = '\%(string\|regex\|special\|doc\|comment\|template\)\c'
4444
let s:syng_comment = '\%(comment\|doc\)\c'
4545

4646
" Expression used to check whether we should skip a match with searchpair().
47-
let s:skip_expr = "s:IsSyn(line('.'),col('.'),0)"
47+
let s:skip_expr = "line('.') < (prevnonblank(v:lnum) - 2000) ? dummy : s:IsSyn(line('.'),col('.'),0)"
4848

4949
func s:lookForParens(start,end,flags,time)
5050
try
51-
return searchpair(a:start,'',a:end,a:flags,
52-
\ "line('.') < " . (prevnonblank(v:lnum) - 2000) . " ? dummy :" . s:skip_expr
53-
\ ,0,a:time)
51+
return searchpair(a:start,'',a:end,a:flags,s:skip_expr,0,a:time)
5452
catch /E118/
5553
return searchpair(a:start,'',a:end,a:flags,0,0)
5654
endtry

0 commit comments

Comments
 (0)