Skip to content

Commit 9516192

Browse files
authored
case statements update
1 parent 055ce0c commit 9516192

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

indent/javascript.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Language: Javascript
33
" Maintainer: vim-javascript community
44
" URL: https://github.com/pangloss/vim-javascript
5-
" Last Change: August 19, 2016
5+
" Last Change: August 20, 2016
66

77
" Only load this indent file when no other was loaded.
88
if exists('b:did_indent')
@@ -181,8 +181,8 @@ function GetJavascriptIndent()
181181
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:sw() : 1))
182182

183183
" most significant, find the indent amount
184-
if (inb && (!swcase && (l:line =~# g:javascript_opfirst || pline =~# g:javascript_continuation))) ||
185-
\ (num < l:lnum && s:OneScope(l:lnum,pline,0) =~# '\<\%(for\|each\|if\|let\|no\sb\|w\%(hile\|ith\)\)\>' &&
184+
if inb && !swcase && ((l:line =~# g:javascript_opfirst || pline =~# g:javascript_continuation) ||
185+
\ num < l:lnum && s:OneScope(l:lnum,pline,0) =~# '\<\%(for\|each\|if\|let\|no\sb\|w\%(hile\|ith\)\)\>' &&
186186
\ l:line !~ s:line_pre . '{')
187187
return (num > 0 ? indent(num) : -s:sw()) + (s:sw() * 2) + switch_offset
188188
elseif num > 0

0 commit comments

Comments
 (0)