From 2c429485ec9b545c6b7c7e99738b4b8824fea59d Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Tue, 18 Aug 2015 21:57:16 +0900 Subject: [PATCH] fix #290. use getpos('.') instead --- autoload/emmet/lang/html.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/emmet/lang/html.vim b/autoload/emmet/lang/html.vim index 41558d2..3f9cba8 100644 --- a/autoload/emmet/lang/html.vim +++ b/autoload/emmet/lang/html.vim @@ -623,10 +623,10 @@ function! emmet#lang#html#parseTag(tag) abort endfunction function! emmet#lang#html#toggleComment() abort - let orgpos = emmet#util#getcurpos() - let curpos = emmet#util#getcurpos() + let orgpos = getpos('.') + let curpos = getpos('.') let mx = '<\%#[^>]*>' - while 1 + while getchar(0) == 0 let block = emmet#util#searchRegion('') if emmet#util#regionIsValid(block) let block[1][1] += 2 @@ -642,7 +642,7 @@ function! emmet#lang#html#toggleComment() abort if pos1[0] == 0 && pos1[1] == 0 return endif - let curpos = emmet#util#getcurpos() + let curpos = getpos('.') continue endif let pos1 = block[0]