mirror of
https://github.com/mattn/emmet-vim.git
synced 2026-08-13 03:21:02 +08:00
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:
+3
-10
@@ -855,10 +855,9 @@ function! emmet#splitJoinTag() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! emmet#mergeLines() range abort
|
function! emmet#mergeLines() range abort
|
||||||
let l:lines = join(map(getline(a:firstline, a:lastline), 'matchstr(v:val, "^\\s*\\zs.*\\ze\\s*$")'), '')
|
let l:type = emmet#getFileType()
|
||||||
let l:indent = substitute(getline('.'), '^\(\s*\).*', '\1', '')
|
call emmet#lang#{emmet#lang#type(l:type)}#mergeLines()
|
||||||
silent! exe 'normal! gvc'
|
return ''
|
||||||
call setline('.', l:indent . l:lines)
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! emmet#removeTag() abort
|
function! emmet#removeTag() abort
|
||||||
@@ -867,12 +866,6 @@ function! emmet#removeTag() abort
|
|||||||
return ''
|
return ''
|
||||||
endfunction
|
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
|
function! emmet#anchorizeURL(flag) abort
|
||||||
let l:mx = 'https\=:\/\/[-!#$%&*+,./:;=?@0-9a-zA-Z_~]\+'
|
let l:mx = 'https\=:\/\/[-!#$%&*+,./:;=?@0-9a-zA-Z_~]\+'
|
||||||
let l:pos1 = searchpos(l:mx, 'bcnW')
|
let l:pos1 = searchpos(l:mx, 'bcnW')
|
||||||
|
|||||||
Reference in New Issue
Block a user