We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4458186 commit 73f3d0fCopy full SHA for 73f3d0f
indent/javascript.vim
@@ -314,8 +314,8 @@ function s:IsContOne(cont)
314
endfunction
315
316
function s:IsSwitch()
317
- call call('cursor',b:js_cache[1:])
318
- return search('\m\C\%#.\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>','nWc'.s:z)
+ return search('\m\C\%'.join(b:js_cache[1:],'l\%').
+ \ 'c{\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>','nW'.s:z)
319
320
321
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
0 commit comments