Fix balance tag. close #107

This commit is contained in:
mattn
2013-04-09 18:45:18 +09:00
parent 286788ae88
commit 2aba8dde8b

View File

@@ -547,7 +547,7 @@ function! zencoding#lang#html#balanceTag(flag) range
endif endif
let settings = zencoding#getSettings() let settings = zencoding#getSettings()
if a:flag > 0 || abs(a:flag) == 1 if a:flag > 0
let mx = '<\([a-zA-Z][a-zA-Z0-9:_\-]*\)[^>]*>' let mx = '<\([a-zA-Z][a-zA-Z0-9:_\-]*\)[^>]*>'
while 1 while 1
let pos1 = searchpos(mx, 'bW') let pos1 = searchpos(mx, 'bW')
@@ -597,10 +597,9 @@ function! zencoding#lang#html#balanceTag(flag) range
endif endif
endwhile endwhile
endif endif
call setpos('.', curpos)
if a:flag == -2 || a:flag == 2 if a:flag == -2 || a:flag == 2
silent! exe "normal! gv" silent! exe "normal! gv"
else
call setpos('.', curpos)
endif endif
endfunction endfunction