Skip to content

Commit 6faa5d7

Browse files
committed
Respect word boundaries when highlighting note names (issue #14)
1 parent a2a2596 commit 6faa5d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/xolox/notes.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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.15.2'
9+
let g:xolox#notes#version = '0.15.3'
1010

1111
function! xolox#notes#shortcut() " {{{1
1212
" The "note:" pseudo protocol is just a shortcut for the :Note command.
@@ -797,7 +797,7 @@ function! xolox#notes#highlight_names(force) " {{{3
797797
if hlexists('notesName')
798798
syntax clear notesName
799799
endif
800-
execute 'syntax match notesName /\c\%>2l\%(' . escape(join(titles, '\|'), '/') . '\)/'
800+
execute 'syntax match notesName /\c\%>1l\<\%(' . escape(join(titles, '\|'), '/') . '\)\>/'
801801
let b:notes_names_last_highlighted = localtime()
802802
call xolox#misc#timer#stop("notes.vim %s: Highlighted note names in %s.", g:xolox#notes#version, starttime)
803803
endif

0 commit comments

Comments
 (0)