Skip to content

remove es6 semi-less do-while handling #698

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 2 commits into from
Nov 8, 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
10 changes: 0 additions & 10 deletions indent/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ function s:iscontOne(i,num,cont)
while l:i >= l:num && (!l:cont || ind > pind)
if indent(l:i) < ind " first line always true for !a:cont, false for !!a:cont
if s:OneScope(l:i,s:Trim(l:i))
if s:token() ==# 'while' &&
\ s:GetPair('\C\<do\>','\C\<while\>','bW','line2byte(line(".")) + col(".") <'
\ . (line2byte(l:num) + b:js_cache[2]) . '||'
\ . s:skip_expr . '|| !s:IsBlock()',100,l:num) > 0
return
endif
let bL += s:W
let [l:cont, l:i] = [0, line('.')]
elseif !l:cont
Expand Down Expand Up @@ -253,10 +247,6 @@ function GetJavascriptIndent()
endif

if stmt || !num
call cursor(v:lnum,1)
if l:line =~# '^while\>' && s:GetPair('\C\<do\>','\C\<while\>','bW',s:skip_expr . '|| !s:IsBlock()',100,num + 1) > 0
return indent(line('.'))
endif
let isOp = l:line =~# s:opfirst || pline =~# s:continuation
let bL = s:iscontOne(l:lnum,num,isOp)
let bL -= (bL && l:line[0] == '{') * s:W
Expand Down