Skip to content

Commit

Permalink
hotfix: Improve switch
Browse files Browse the repository at this point in the history
This isn't worth starting dev branch again
  • Loading branch information
bounceme authored Nov 8, 2016
1 parent 3abb9ae commit e9a59c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indent/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function GetJavascriptIndent()
let stmt = 1
if s:current_char() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0 && s:previous_token() ==# 'switch'
let switch_offset = &cino !~ ':' || !has('float') ? s:W :
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:W : 1))
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '\%(.*:\)\@>[^,]*s' ? s:W : 1))
if l:line =~# '^' . s:case_stmt
return indent(num) + switch_offset
endif
Expand Down

0 comments on commit e9a59c8

Please sign in to comment.