forked from VimPlug/emmet-vim
fix bug that break multibyte characters when using wize selection.
This commit is contained in:
@@ -699,7 +699,6 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
let expand .= s:zen_toString(item, type, 0, filters)
|
let expand .= s:zen_toString(item, type, 0, filters)
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
silent! exe "normal! gvc"
|
|
||||||
else
|
else
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
if col('.') < len(line)
|
if col('.') < len(line)
|
||||||
@@ -739,8 +738,6 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
endif
|
endif
|
||||||
let expand = substitute(expand, '${lang}', s:zen_settings.lang, 'g')
|
let expand = substitute(expand, '${lang}', s:zen_settings.lang, 'g')
|
||||||
let expand = substitute(expand, '${charset}', s:zen_settings.charset, 'g')
|
let expand = substitute(expand, '${charset}', s:zen_settings.charset, 'g')
|
||||||
let expand = substitute(expand, '\${cursor}', '$cursor$', '')
|
|
||||||
let expand = substitute(expand, '\${cursor}', '', 'g')
|
|
||||||
if has_key(s:zen_settings, 'timezone') && len(s:zen_settings.timezone)
|
if has_key(s:zen_settings, 'timezone') && len(s:zen_settings.timezone)
|
||||||
let expand = substitute(expand, '${datetime}', strftime("%Y-%m-%dT%H:%M:%S") . s:zen_settings.timezone, 'g')
|
let expand = substitute(expand, '${datetime}', strftime("%Y-%m-%dT%H:%M:%S") . s:zen_settings.timezone, 'g')
|
||||||
else
|
else
|
||||||
@@ -748,9 +745,12 @@ function! zencoding#expandAbbr(mode) range
|
|||||||
let expand = substitute(expand, '${datetime}', strftime("%Y-%m-%dT%H:%M:%S %z"), 'g')
|
let expand = substitute(expand, '${datetime}', strftime("%Y-%m-%dT%H:%M:%S %z"), 'g')
|
||||||
endif
|
endif
|
||||||
if a:mode == 2 && a:firstline == a:lastline
|
if a:mode == 2 && a:firstline == a:lastline
|
||||||
let line = getline('.')
|
let expand = substitute(expand, '>\n\s*', '>', 'g')
|
||||||
call setline(line('.'), line[0:col('.')].substitute(expand, '>\n\s*', '>', 'g').line[col('.'):])
|
let expand = substitute(expand, '\${cursor}', '', '')
|
||||||
|
call feedkeys("gvc".expand, 'n')
|
||||||
else
|
else
|
||||||
|
let expand = substitute(expand, '\${cursor}', '$cursor$', '')
|
||||||
|
let expand = substitute(expand, '\${cursor}', '', 'g')
|
||||||
if line[:-len(part)-1] =~ '^\s\+$'
|
if line[:-len(part)-1] =~ '^\s\+$'
|
||||||
let indent = line[:-len(part)-1]
|
let indent = line[:-len(part)-1]
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user