Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion indent/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,11 @@ function GetJavascriptIndent()

" cindent each line which has a switch label
if (line =~ s:expr_case)
return cindent(v:lnum)
let s:cpo_switch = &cpo
set cpo+=%
let ind = cindent(v:lnum)
let &cpo = s:cpo_switch
return ind
endif

" If we got a closing bracket on an empty line, find its match and indent
Expand Down