File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 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.
88if 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
You can’t perform that action at this time.
0 commit comments