Skip to content

Commit 5c4de0c

Browse files
authored
slight changes to the skip_func (#632)
This is what I was initially intending to do. this version works mostly the same
1 parent faf6f67 commit 5c4de0c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: indent/javascript.vim

+1-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ let s:syng_comment = '\%(comment\|doc\)'
4848
" Expression used to check whether we should skip a match with searchpair().
4949
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
5050
function s:skip_func(lnum)
51-
if !s:free || getline(line('.')) =~ '[''/"\\]'
52-
return eval(s:skip_expr)
53-
endif
54-
if search('`','nW',a:lnum) || search('\*\/','nW',a:lnum)
51+
if !s:free || getline(line('.')) =~ '[''/"\\]' || search('`','nW',a:lnum) || search('\*\/','nW',a:lnum)
5552
let s:free = !eval(s:skip_expr)
5653
endif
5754
let s:looksyn = s:free ? line('.') : s:looksyn

0 commit comments

Comments
 (0)