From f6ec550802c67b0d56ec96f83b2eadd1d957e36f Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Thu, 29 Sep 2011 21:31:14 +0200 Subject: [PATCH] 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...) --- autoload/xolox/notes.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autoload/xolox/notes.vim b/autoload/xolox/notes.vim index b62ccb4..59f22b9 100644 --- a/autoload/xolox/notes.vim +++ b/autoload/xolox/notes.vim @@ -1,12 +1,12 @@ " Vim auto-load script " Author: Peter Odding -" Last Change: September 26, 2011 +" Last Change: September 29, 2011 " URL: http://peterodding.com/code/vim/notes/ " Note: This file is encoded in UTF-8 including a byte order mark so " that Vim loads the script using the right encoding transparently. -let g:xolox#notes#version = '0.11.5' +let g:xolox#notes#version = '0.11.6' function! xolox#notes#shortcut() " {{{1 " The "note:" pseudo protocol is just a shortcut for the :Note command. @@ -712,7 +712,9 @@ function! xolox#notes#highlight_names(force) " {{{3 let titles = filter(xolox#notes#get_titles(1), '!empty(v:val)') call map(titles, 's:words_to_pattern(v:val)') call sort(titles, 's:sort_longest_to_shortest') - syntax clear notesName + if hlexists('notesName') + syntax clear notesName + endif execute 'syntax match notesName /\c\%>2l\%(' . escape(join(titles, '\|'), '/') . '\)/' let b:notes_names_last_highlighted = localtime() call xolox#misc#timer#stop("notes.vim %s: Highlighted note names in %s.", g:xolox#notes#version, starttime)