Skip to content

Commit

Permalink
Don't highlight the name of the current note
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Nov 25, 2011
1 parent 38056ee commit d49f215
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions autoload/xolox/notes.vim
@@ -1,12 +1,12 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: November 24, 2011
" Last Change: November 25, 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.14.3'
let g:xolox#notes#version = '0.14.4'

function! xolox#notes#shortcut() " {{{1
" The "note:" pseudo protocol is just a shortcut for the :Note command.
Expand Down Expand Up @@ -780,7 +780,8 @@ function! xolox#notes#highlight_names(force) " {{{3
" Highlight the names of all notes as "notesName" (linked to "Underlined").
if a:force || !(exists('b:notes_names_last_highlighted') && b:notes_names_last_highlighted > s:cache_mtime)
let starttime = xolox#misc#timer#start()
let titles = filter(xolox#notes#get_titles(1), '!empty(v:val)')
let current_note = getline(1)
let titles = filter(xolox#notes#get_titles(1), '!empty(v:val) && v:val != current_note')
call map(titles, 's:words_to_pattern(v:val)')
call sort(titles, 's:sort_longest_to_shortest')
if hlexists('notesName')
Expand Down

0 comments on commit d49f215

Please sign in to comment.