forked from VimPlug/emmet-vim
Fixes toggle comment. <meta charset="utf-8"> make it hang
This commit is contained in:
@@ -559,10 +559,14 @@ function! emmet#lang#html#toggleComment()
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
call setpos('.', [0, pos2[0], pos2[1], 0])
|
call setpos('.', [0, pos2[0], pos2[1], 0])
|
||||||
let pos2 = searchpairpos('<'. tag_name . '>', '', '</' . tag_name . '>', 'nW')
|
let pos3 = searchpairpos('<'. tag_name . '>', '', '</' . tag_name . '>', 'nW')
|
||||||
call setpos('.', [0, pos2[0], pos2[1], 0])
|
if pos3 == [0, 0]
|
||||||
let pos2 = searchpos('>', 'neW')
|
let block = [pos1, pos2]
|
||||||
let block = [pos1, pos2]
|
else
|
||||||
|
call setpos('.', [0, pos3[0], pos3[1], 0])
|
||||||
|
let pos2 = searchpos('>', 'neW')
|
||||||
|
let block = [pos1, pos2]
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
if !emmet#util#regionIsValid(block)
|
if !emmet#util#regionIsValid(block)
|
||||||
silent! call setpos('.', orgpos)
|
silent! call setpos('.', orgpos)
|
||||||
|
|||||||
Reference in New Issue
Block a user