We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3d8a97 commit e110653Copy full SHA for e110653
1 file changed
indent/javascript.vim
@@ -469,7 +469,11 @@ function GetJavascriptIndent()
469
elseif num
470
return s:Nat(num_ind + get(l:,'case_offset',s:sw()) + l:switch_offset + b_l + is_op)
471
endif
472
- return b_l + is_op
+ let ret = b_l + is_op
473
+ if !ret && exists('b:hi_indent.blocklnr')
474
+ return indent(b:hi_indent.blocklnr) + s:sw()
475
+ endif
476
+ return ret
477
endfunction
478
479
let &cpo = s:cpo_save
0 commit comments