We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc34b24 commit 5d8153eCopy full SHA for 5d8153e
indent/javascript.vim
@@ -255,7 +255,7 @@ function GetJavascriptIndent()
255
" most significant, find the indent amount
256
let isOp = l:line =~# s:opfirst || pline !~# s:expr_case . '$' && pline =~# s:continuation
257
let bL = s:iscontOne(l:lnum,num,isOp)
258
- let bL -= (bL && strridx(l:line,'{',0) + 1) * s:W
+ let bL -= (bL && l:line[0] == '{') * s:W
259
if isOp && (!num || bchar && cursor(b:js_cache[1],b:js_cache[2])+1 && s:IsBlock())
260
return (num ? indent(num) : -s:W) + (s:W * 2) + switch_offset + bL
261
elseif num
0 commit comments