Skip to content

Commit 0bc533c

Browse files
authored
comment misalignment
#493
1 parent 52e8f90 commit 0bc533c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indent/javascript.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ setlocal nosmartindent
1717
setlocal indentexpr=GetJavascriptIndent()
1818
setlocal formatexpr=Fixedgq(v:lnum,v:count)
1919
setlocal indentkeys=0{,0},0),0],0\,*<Return>,:,!^F,o,O,e
20-
setlocal cinoptions+=j1,J1
20+
setlocal cinoptions+=j1,J1,c1
2121

2222
" Only define the function once.
2323
if exists("*GetJavascriptIndent")
@@ -413,7 +413,7 @@ function GetJavascriptIndent()
413413
" If the line is empty and the previous nonblank line was a multi-line
414414
" comment, use that comment's indent. Deduct one char to account for the
415415
" space in ' */'.
416-
if line =~ '^\s*$' && getline(prevline) !~ '\%(\%(^\s*\/\/\|\/\*\).*\)\@<!\*\/' &&
416+
if line =~ '^\s*$' && getline(prevline) =~ '\%(\%(^\s*\/\/\|\/\*\).*\)\@<!\*\/' &&
417417
\ s:IsInComment(prevline, 1)
418418
return indent(prevline) - 1
419419
endif

0 commit comments

Comments
 (0)