@@ -291,9 +291,11 @@ function s:IndentWithContinuation(lnum, ind, width)
291
291
if s: Match (lnum, s: continuation_regex )
292
292
if lnum == p_lnum
293
293
return msl_ind + a: width
294
- else
294
+ elseif ! s: InMultiVarStatement ( a: lnum )
295
295
return msl_ind
296
- endif
296
+ else
297
+ return msl_ind - a: width
298
+ end
297
299
endif
298
300
299
301
return a: ind
@@ -401,8 +403,12 @@ function GetJavascriptIndent()
401
403
" If the line is comma first, dedent 1 level
402
404
if (getline (prevline) = ~ s: comma_first )
403
405
return indent (prevline) - s: sw ()
404
- elseif getline (s: PrevNonBlankNonString (prevline - 1 )) = ~ ' [])}]' . s: comma_last && getline (prevline) !~ s: comma_last && getline (prevline) !~ s: block_regex
405
- return indent (prevline) - s: sw ()
406
+ elseif getline (s: PrevNonBlankNonString (prevline - 1 )) = ~ ' [])}]' . s: comma_last && getline (prevline) !~ s: block_regex
407
+ if getline (prevline) !~ s: comma_last
408
+ return indent (prevline) - s: sw ()
409
+ else
410
+ return indent (prevline)
411
+ end
406
412
end
407
413
408
414
" If line starts with an operator...
@@ -447,13 +453,13 @@ function GetJavascriptIndent()
447
453
end
448
454
end
449
455
450
- if getline (prevline) = ~ ' ^\s*`$' && s: IsInTempl (v: lnum , 1 )
451
- if line !~ ' ^\s*`$'
452
- return indent (prevline) + s: sw ()
453
- endif
454
- elseif line = ~ ' ^\s*`$' && s: IsInTempl (prevline, 1 )
455
- return indent (prevline) - s: sw ()
456
- endif
456
+ " if getline(prevline) =~ '^\s*`$' && s:IsInTempl(v:lnum, 1)
457
+ " if line !~ '^\s*`$'
458
+ " return indent(prevline) + s:sw()
459
+ " endif
460
+ " elseif line =~ '^\s*`$' && s:IsInTempl(prevline, 1)
461
+ " return indent(prevline) - s:sw()
462
+ " endif
457
463
458
464
" Check for multiple var assignments
459
465
" let var_indent = s:GetVarIndent(v:lnum)
0 commit comments