Skip to content

Commit 5900fce

Browse files
authored
last commit revert
1 parent 6787729 commit 5900fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indent/javascript.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function GetJavascriptIndent()
174174
let swcase = getline(l:lnum) =~# s:expr_case
175175
let pline = swcase ? getline(l:lnum) : substitute(getline(l:lnum), '\%(:\@<!\/\/.*\)$', '','')
176176
let inb = num == 0 || num < l:lnum && ((l:line !~ s:line_pre . ',' && pline !~ ',' . s:line_term) || s:IsBlock())
177-
let switch_offset = num == 0 || s:OneScope(num, getline(num)[: b:js_cache[2] - 2],1) !=# 'switch' ? 0 :
177+
let switch_offset = num == 0 || s:OneScope(num, strpart(getline(num),0,b:js_cache[2] - 1),1) !=# 'switch' ? 0 :
178178
\ &cino !~ ':' || !has('float') ? s:sw() :
179179
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:sw() : 1))
180180

0 commit comments

Comments
 (0)