diff --git a/plugin/hicursorwords.vim b/plugin/hicursorwords.vim index d98dd3b..668a6dc 100644 --- a/plugin/hicursorwords.vim +++ b/plugin/hicursorwords.vim @@ -75,7 +75,7 @@ endfunction function! s:HiCursorWords__getWordUnderTheCursor(linestr, linenum, colnum) "let word = substitute(a:linestr, '.*\(\<\k\{-}\%' . a:colnum . 'c\k\{-}\>\).*', '\1', '') "expand('') let word = matchstr(a:linestr, '\k*\%' . a:colnum . 'c\k\+') - if a:linestr == word + if word == '' return '' endif return '\V\<' . word . '\>' @@ -111,7 +111,7 @@ function! s:HiCursorWords__startHilighting() augroup HiCursorWordsUpdate autocmd! autocmd CursorHold,CursorHoldI * - \ let &updatetime = b:HiCursorWords__oldUpdatetime + \ if exists('b:HiCursorWords__oldUpdatetime') | let &updatetime = b:HiCursorWords__oldUpdatetime | endif \ | call s:HiCursorWords__execute() augroup END endfunction