Skip to content

add label support #582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2016
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: 4 additions & 2 deletions indent/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Language: Javascript
" Maintainer: vim-javascript community
" URL: https://github.com/pangloss/vim-javascript
" Last Change: July 30, 2016
" Last Change: July 31, 2016

" Only load this indent file when no other was loaded.
if exists("b:did_indent")
Expand Down Expand Up @@ -191,7 +191,9 @@ function GetJavascriptIndent()
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (match(&cino,'.*:\zs[^,]*s') ? s:sw() : 1))
let pline = s:StripLine(getline(lnum))
if ((line =~ g:javascript_opfirst ||
\ (pline =~ g:javascript_continuation && pline !~ s:expr_case)) &&
\ (pline =~ g:javascript_continuation && pline !~ s:expr_case &&
\ (pline !~ ':' . s:line_term || line !~# s:line_pre .
\ '\%(debugger\|do\|else\|finally\|for\|if\|let\|switch\|throw\|try\|while\|with\)'))) &&
\ inb) || (s:Onescope(lnum,pline,0) && line !~ s:line_pre . '{')
return (num > 0 ? indent(num) : -s:sw()) + (s:sw() * 2) + switch_offset
elseif num > 0
Expand Down