Skip to content

Commit 460598f

Browse files
authored
fix 'default' property identifier (#689)
1 parent 4456229 commit 460598f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

indent/javascript.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ function s:IsBlock()
140140
elseif char == '>'
141141
return pchar == '=' || syn =~? '^jsflow'
142142
elseif char == ':'
143-
return strpart(getline('.'),0,col('.')) =~# s:expr_case . '$'
143+
return cursor(0,match(' ' . strpart(getline('.'),0,col('.')),s:expr_case . '$')) + 1 &&
144+
\ (expand('<cword>') !=# 'default' || !search('\S','bW') || getline('.')[col('.')-1] !~ '[,{]')
144145
else
145146
return stridx('-=~!<*+,/?^%|&([',char) < 0
146147
endif

0 commit comments

Comments
 (0)