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:
Yasuhiro Matsumoto
2026-03-07 16:44:38 +09:00
parent 7c44caa0e6
commit edb1941955

View File

@@ -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')