From ef9128435a45a42fe9968daad45fdf5e2f501341 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Wed, 8 Feb 2017 12:23:45 -0500 Subject: [PATCH] Added hicursorwords v0.2 --- plugin/hicursorwords.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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