diff --git a/indent/javascript.vim b/indent/javascript.vim index 4b8b1f94..d683d961 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -17,7 +17,7 @@ setlocal nosmartindent setlocal indentexpr=GetJavascriptIndent() setlocal formatexpr=Fixedgq(v:lnum,v:count) setlocal indentkeys=0{,0},0),0],0\,*,:,!^F,o,O,e -setlocal cinoptions+=j1,J1 +setlocal cinoptions+=j1,J1,c1 " Only define the function once. if exists("*GetJavascriptIndent") @@ -413,7 +413,7 @@ function GetJavascriptIndent() " If the line is empty and the previous nonblank line was a multi-line " comment, use that comment's indent. Deduct one char to account for the " space in ' */'. - if line =~ '^\s*$' && getline(prevline) !~ '\%(\%(^\s*\/\/\|\/\*\).*\)\@