We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91314f3 commit fce8e77Copy full SHA for fce8e77
1 file changed
indent/javascript.vim
@@ -84,7 +84,7 @@ endfunction
84
function s:IsBlock()
85
return getline(line('.'))[col('.')-1] == '{' && !search(
86
\ '\C\%(\<return\s*\|\%([-=~!<*+,.:?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\%(\_s\+default\)\=\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
87
- \ (!search('{\_s*\%#','bW') || s:IsBlock())
+ \ (!search('\%({\|:\zs\)\_s*\%#','bW') || search(s:expr_case . '\%#' ,'nbW') || s:IsBlock())
88
endfunction
89
90
" Auxiliary Functions {{{2
0 commit comments