Skip to content
Browse files

only highlight matches after cursor position

  • Loading branch information...
1 parent 0b7665b commit 583fa8373562be728fd97f96c4086c9dde88a9db @chrisbra committed Mar 12, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 autoload/ftimproved.vim
View
4 autoload/ftimproved.vim
@@ -94,7 +94,9 @@ fun! <sid>HighlightMatch(char) "{{{1
let output=''
if !empty(a:char)
let output = matchstr(a:char, '^\%(\\c\)\?\\V\zs.*')
- let s:matchid = matchadd('IncSearch', a:char)
+ let pat = '\%(\%>'. col('.'). 'c\&\%'. line('.'). 'l'
+ let pat .= '\|\%>'. line('.'). 'l\)'. a:char
+ let s:matchid = matchadd('IncSearch', pat)
endif
redraw!
" Output input string after(!) redraw.

0 comments on commit 583fa83

Please sign in to comment.
Something went wrong with that request. Please try again.