Skip to content

Commit 4458186

Browse files
authored
improve last commit
1 parent e110653 commit 4458186

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

indent/javascript.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,11 @@ function GetJavascriptIndent()
469469
elseif num
470470
return s:Nat(num_ind + get(l:,'case_offset',s:sw()) + l:switch_offset + b_l + is_op)
471471
endif
472-
let ret = b_l + is_op
473-
if !ret && exists('b:hi_indent.blocklnr')
474-
return indent(b:hi_indent.blocklnr) + s:sw()
472+
let nest = get(get(b:,'hi_indent',{}),'blocklnr')
473+
if nest
474+
return indent(nest) + s:sw() + b_l + is_op
475475
endif
476-
return ret
476+
return b_l + is_op
477477
endfunction
478478

479479
let &cpo = s:cpo_save

0 commit comments

Comments
 (0)