Skip to content

Commit df6c7ef

Browse files
authored
remove whitespace and regex mistake
1 parent 31d8b39 commit df6c7ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

indent/javascript.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ let s:syng_comment = '\%(comment\|doc\)\c'
4747
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"
4848

4949
func s:lookForParens(start,end,flags,time)
50-
try
50+
try
5151
return searchpair(a:start,'',a:end,a:flags,
5252
\ "line('.') < " . (prevnonblank(v:lnum) - 2000) . " ? dummy :" . s:skip_expr
5353
\ ,0,a:time)
@@ -74,7 +74,7 @@ function s:Onescope(lnum)
7474
\ (cursor(a:lnum, match(getline(a:lnum),')' . s:line_term)) > -1 &&
7575
\ s:lookForParens('(', ')', 'cbW', 100) > 0 &&
7676
\ cursor(line('.'),match( ' ' . strpart(getline(line('.')),0,col('.') - 1),
77-
\ '\<\%(else\|for\%(\s+each\)\=\|if\|let\|while\|with\)\C' . s:line_term)) > -1) &&
77+
\ '\<\%(else\|for\%(\s+each\)\=\|if\|let\|while\|with\)\C' . s:line_term)) > -1) &&
7878
\ (expand("<cword>") =~ 'while\C' ? !s:lookForParens('\<do\>\C', '\<while\>\C','bw',100) : 1)
7979
endfunction
8080

@@ -195,7 +195,7 @@ function GetJavascriptIndent()
195195
if index(map(synstack(v:lnum, 1), 'synIDattr( v:val, "name")'),'jsSwitchBlock') > -1
196196
let bnum = search('\<switch\s*(','nbw')
197197
let switch_offset = bnum < num || bnum == lnum ? 0 : &cino !~ ':' ? s:sw() :
198-
\ matchstr(&cino,'.*:\zs[0-9.]*\ze') * (match(&cino,'.*:\zs[^,]*s') ? s:sw() : 1)
198+
\ matchstr(&cino,'.*:\zs[0-9.]*') * (match(&cino,'.*:\zs[^,]*s') ? s:sw() : 1)
199199
endif
200200
if (line =~ g:javascript_opfirst ||
201201
\ (getline(lnum) =~ g:javascript_continuation && getline(lnum) !~ s:expr_case) ||

0 commit comments

Comments
 (0)