From e9a59c87703d7d67d9933e68b80732326163a5c5 Mon Sep 17 00:00:00 2001 From: Chris Paul Date: Tue, 8 Nov 2016 10:05:43 -0800 Subject: [PATCH] hotfix: Improve switch This isn't worth starting dev branch again --- indent/javascript.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indent/javascript.vim b/indent/javascript.vim index f68bdd85..b72ff920 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -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