Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't highlight the name of the current note

  • Loading branch information...
commit d49f215087a45dbbf4336bb9e6813aa1709c80ba 1 parent 38056ee
@xolox authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 autoload/xolox/notes.vim
View
7 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.
@@ -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')
Please sign in to comment.
Something went wrong with that request. Please try again.