From 6a1f77b32224bb86c50c687ea1f8f70cf4b440a0 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 20 Sep 2019 00:28:01 +0200 Subject: Major version update --- plugin/max-highlight-word-under-cursor.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugin/max-highlight-word-under-cursor.vim') diff --git a/plugin/max-highlight-word-under-cursor.vim b/plugin/max-highlight-word-under-cursor.vim index c6d6964..f18c212 100644 --- a/plugin/max-highlight-word-under-cursor.vim +++ b/plugin/max-highlight-word-under-cursor.vim @@ -11,10 +11,12 @@ function! HighlightWordUnderCursor() let l:currentword = escape(expand(''), '.') if(strlen(l:currentword) > 0) let w:m1=100 - if(match(expand(''), '^#\x\{6\}') == 0) - exec 'highlight! CurrentColor guibg='.expand('') + let l:q = matchstr(expand(''), '\x\{6\}') + if(l:q != "") + exec 'highlight! CurrentColor guibg=#'.l:q + " call matchadd('CurrentColor', escape(expand(''), '.'), -1, w:m1) + " if(match(expand(''), '^#\x\{6\}\|^0x\x\{6\}') == 0) hi CurrentColor - " silent! call matchadd('CurrentColor', escape(expand(''), '.'), -1, w:m1) else silent! call matchadd('Underline', '\<'.l:currentword.'\>', -1, w:m1) endif -- cgit v1.2.3