Skip to content

Commit f6ec550

Browse files
committed
Bug fix for "E28: No such highlight group name: notesName"
(noticed this when I ran the plug-in outside of my Vim profile, not sure why I never noticed it before though...)
1 parent 2f1229f commit f6ec550

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

autoload/xolox/notes.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
" Vim auto-load script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: September 26, 2011
3+
" Last Change: September 29, 2011
44
" URL: http://peterodding.com/code/vim/notes/
55

66
" Note: This file is encoded in UTF-8 including a byte order mark so
77
" that Vim loads the script using the right encoding transparently.
88

9-
let g:xolox#notes#version = '0.11.5'
9+
let g:xolox#notes#version = '0.11.6'
1010

1111
function! xolox#notes#shortcut() " {{{1
1212
" The "note:" pseudo protocol is just a shortcut for the :Note command.
@@ -712,7 +712,9 @@ function! xolox#notes#highlight_names(force) " {{{3
712712
let titles = filter(xolox#notes#get_titles(1), '!empty(v:val)')
713713
call map(titles, 's:words_to_pattern(v:val)')
714714
call sort(titles, 's:sort_longest_to_shortest')
715-
syntax clear notesName
715+
if hlexists('notesName')
716+
syntax clear notesName
717+
endif
716718
execute 'syntax match notesName /\c\%>2l\%(' . escape(join(titles, '\|'), '/') . '\)/'
717719
let b:notes_names_last_highlighted = localtime()
718720
call xolox#misc#timer#stop("notes.vim %s: Highlighted note names in %s.", g:xolox#notes#version, starttime)

0 commit comments

Comments
 (0)