forked from VimPlug/emmet-vim
Support Vim 7.2
This commit is contained in:
@@ -622,9 +622,9 @@ function! emmet#expandAbbr(mode, abbr) range abort
|
|||||||
let expand = emmet#unescapeDollarExpr(expand)
|
let expand = emmet#unescapeDollarExpr(expand)
|
||||||
if a:mode ==# 2 && visualmode() ==# 'v'
|
if a:mode ==# 2 && visualmode() ==# 'v'
|
||||||
if a:firstline ==# a:lastline
|
if a:firstline ==# a:lastline
|
||||||
let expand = substitute(expand, '\n\s*', '', 'g')
|
let expand = substitute(expand, '[\r\n]\s*', '', 'g')
|
||||||
else
|
else
|
||||||
let expand = substitute(expand, '\n$', '', 'g')
|
let expand = substitute(expand, '[\n]$', '', 'g')
|
||||||
endif
|
endif
|
||||||
silent! normal! gv
|
silent! normal! gv
|
||||||
let col = col('''<')
|
let col = col('''<')
|
||||||
@@ -644,14 +644,14 @@ function! emmet#expandAbbr(mode, abbr) range abort
|
|||||||
else
|
else
|
||||||
let indent = ''
|
let indent = ''
|
||||||
endif
|
endif
|
||||||
let expand = substitute(expand, '\n\s*$', '', 'g')
|
let expand = substitute(expand, '[\r\n]\s*$', '', 'g')
|
||||||
if emmet#useFilter(filters, 's')
|
if emmet#useFilter(filters, 's')
|
||||||
let epart = substitute(expand, "\n\s\*", '', 'g')
|
let epart = substitute(expand, '[\r\n]\s\*', '', 'g')
|
||||||
else
|
else
|
||||||
let epart = substitute(expand, "\n", "\n" . indent, 'g')
|
let epart = substitute(expand, '[\r\n]', "\n" . indent, 'g')
|
||||||
endif
|
endif
|
||||||
let expand = line[:-len(part)-1] . epart . rest
|
let expand = line[:-len(part)-1] . epart . rest
|
||||||
let lines = split(expand, "\n", 1)
|
let lines = split(expand, '[\r\n]', 1)
|
||||||
if a:mode ==# 2
|
if a:mode ==# 2
|
||||||
silent! exe 'normal! gvc'
|
silent! exe 'normal! gvc'
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user