remove \<right>

This commit is contained in:
mattn
2014-03-11 21:41:17 +09:00
parent 7268e203b8
commit d894c67aa9
3 changed files with 19 additions and 16 deletions

View File

@@ -633,17 +633,20 @@ function! emmet#expandAbbr(mode, abbr) range
endif
let expand = substitute(expand, '\n\s*$', '', 'g')
let expand = line[:-len(part)-1] . substitute(expand, "\n", "\n" . indent, 'g') . rest
let lines = split(expand, '\n')
let lines = split(expand, "\n", 1)
if a:mode == 2
silent! exe "normal! gvc"
endif
call setline(line('.'), lines[0])
call setline('.', lines[0])
if len(lines) > 1
call append(line('.'), lines[1:])
call append('.', lines[1:])
endif
endif
endif
if search('\ze\$cursor\$', 'e')
if g:emmet_debug > 1
call getchar()
endif
if search('\ze\$cursor\$')
let oldselection = &selection
let &selection = 'inclusive'
if foldclosed(line('.')) != -1
@@ -653,10 +656,9 @@ function! emmet#expandAbbr(mode, abbr) range
silent! s/\$cursor\$//
silent! call setpos('.', pos)
let &selection = oldselection
redraw
endif
if g:emmet_debug > 1
call getchar()
if col('.') < col('$')
return "\<right>"
endif
endif
return ''
endfunction

View File

@@ -196,7 +196,8 @@ function! emmet#lang#html#parseIntoTree(abbr, type)
let atts = item[1:-2]
if matchstr(atts, '^\s*\zs[0-9a-zA-Z-:]\+\(="[^"]*"\|=''[^'']*''\|=[^ ''"]\+\)') == ''
if has_key(default_attributes, current.name)
let keys = keys(default_attributes[current.name])
let dfa = default_attributes[current.name]
let keys = type(dfa) == 3 ? keys(dfa[0]) : keys(dfa)
endif
if len(keys) == 0
let keys = keys(default_attributes[current.name . ':src'])