forked from VimPlug/emmet-vim
Fix duplicate mergeLines() definition
The second definition without 'range' was overwriting the first one, causing the visual selection merge to not work properly. Removed the duplicate and kept the lang-delegating version.
This commit is contained in:
@@ -855,10 +855,9 @@ function! emmet#splitJoinTag() abort
|
||||
endfunction
|
||||
|
||||
function! emmet#mergeLines() range abort
|
||||
let l:lines = join(map(getline(a:firstline, a:lastline), 'matchstr(v:val, "^\\s*\\zs.*\\ze\\s*$")'), '')
|
||||
let l:indent = substitute(getline('.'), '^\(\s*\).*', '\1', '')
|
||||
silent! exe 'normal! gvc'
|
||||
call setline('.', l:indent . l:lines)
|
||||
let l:type = emmet#getFileType()
|
||||
call emmet#lang#{emmet#lang#type(l:type)}#mergeLines()
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! emmet#removeTag() abort
|
||||
@@ -867,12 +866,6 @@ function! emmet#removeTag() abort
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! emmet#mergeLines() abort
|
||||
let l:type = emmet#getFileType()
|
||||
call emmet#lang#{emmet#lang#type(l:type)}#mergeLines()
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! emmet#anchorizeURL(flag) abort
|
||||
let l:mx = 'https\=:\/\/[-!#$%&*+,./:;=?@0-9a-zA-Z_~]\+'
|
||||
let l:pos1 = searchpos(l:mx, 'bcnW')
|
||||
|
||||
Reference in New Issue
Block a user