Skip to content

Commit 3e0b1af

Browse files
authored
use printf instead of '.' (#1106)
1 parent da18e87 commit 3e0b1af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

indent/javascript.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ function s:IsContOne(cont)
311311
endfunction
312312

313313
function s:IsSwitch()
314-
return search('\m\C\%'.join(b:js_cache[1:],'l\%').
315-
\ 'c{\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>','nW'.s:z)
314+
return search(printf('\m\C\%%%dl\%%%dc%s',b:js_cache[1],b:js_cache[2],
315+
\ '{\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>'),'nW'.s:z)
316316
endfunction
317317

318318
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader

0 commit comments

Comments
 (0)