Skip to content

Commit ea58033

Browse files
authored
a solution for 486 (#488)
this just makes the indentation increase with an initial dot chained method
1 parent 22c6f6d commit ea58033

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
@@ -369,7 +369,8 @@ function GetJavascriptIndent()
369369

370370
" If line starts with an operator...
371371
if (line =~ s:operator_first)
372-
if (s:Match(lnum, s:operator_first) || s:Match(lnum, s:line_pre . '[])}]'))
372+
if (s:Match(lnum, s:operator_first) || (s:Match(lnum, s:line_pre . '[])}]') &&
373+
\ !(s:Match(v:lnum,s:line_pre . '\.') && s:Match(lnum, ')' . s:line_term))))
373374
" and so does previous line, don't indent
374375
return indent(lnum)
375376
end

0 commit comments

Comments
 (0)