diff options
author | Max Christian Pohle | 2021-10-19 09:59:00 +0200 |
---|---|---|
committer | Max Christian Pohle | 2021-10-19 09:59:00 +0200 |
commit | df83bdccd7ce16c97e76011da9d70c17a1d243af (patch) | |
tree | 10fc12c7f30c9049f10d08f3789e3fb8cebf6e0b /plugin | |
parent | b6f9c6c0318caee7242f9426c39a1ae206275997 (diff) | |
download | vim-under-the-cursor-df83bdccd7ce16c97e76011da9d70c17a1d243af.tar.bz2 vim-under-the-cursor-df83bdccd7ce16c97e76011da9d70c17a1d243af.zip |
Fix: Color preview now also works within comments
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/vim-under-the-cursor.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/vim-under-the-cursor.vim b/plugin/vim-under-the-cursor.vim index cc31e36..b91c2bd 100644 --- a/plugin/vim-under-the-cursor.vim +++ b/plugin/vim-under-the-cursor.vim | |||
@@ -43,7 +43,8 @@ function! HighlightWordUnderCursor() | |||
43 | endif | 43 | endif |
44 | 44 | ||
45 | exec 'syntax clear ' . l:color | 45 | exec 'syntax clear ' . l:color |
46 | exec 'syntax match ' . l:color . ' /\#' . l:q . '\>/' | 46 | exec 'syntax match ' . l:color . ' /\#' . l:q . '\>/' . |
47 | \ ' containedin=' . synIDattr(synstack(line('.'), col('.'))[0], "name") . ' contained' | ||
47 | else | 48 | else |
48 | silent! call matchadd('Underlined', '\<'.l:currentword.'\>', -1, w:m1) | 49 | silent! call matchadd('Underlined', '\<'.l:currentword.'\>', -1, w:m1) |
49 | endif | 50 | endif |