Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: chrisbra/improvedft
base: de2a17109a
...
head fork: chrisbra/improvedft
compare: 0cfba1dee3
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 1 deletion.
  1. +7 −1 autoload/ftimproved.vim
View
8 autoload/ftimproved.vim
@@ -94,12 +94,18 @@ fun! <sid>HighlightMatch(char, dir) "{{{1
let output=''
if !empty(a:char)
let output = matchstr(a:char, '^\%(\\c\)\?\\V\zs.*')
+ " remove escaping for display
+ let output = substitute(output, '\\\\', '\\', 'g')
if a:dir
let pat = '\%(\%>'. col('.'). 'c\&\%'. line('.'). 'l'
let pat .= '\|\%>'. line('.'). 'l\)'. a:char
+ " Make sure, it only matches within the current viewport
+ let pat = '\%('. pat. '\m\)\ze\&\%<'.(line('w$')+1).'l'
else
let pat = '\%(\%<'. col('.'). 'c\&\%'. line('.'). 'l'
let pat .= '\|\%<'. line('.'). 'l\)'. a:char
+ " Make sure, it only matches within the current viewport
+ let pat = '\%('. pat. '\m\)\ze\&\%>'.(line('w0')-1).'l'
endif
let s:matchid = matchadd('IncSearch', pat)
endif
@@ -305,7 +311,7 @@ fun! ftimproved#FTCommand(f, fwd, mode) "{{{1
"endif
let cmd = op_off[0].cmd
let off .= op_off[1]
- let pat1 = (a:fwd ? pat : escape(pat, '?'))
+ let pat1 = (a:fwd ? escape(pat, '/') : escape(pat, '?'))
let res = cmd.pat1.off."\<cr>"
else
" Searching using 't' command

No commit comments for this range

Something went wrong with that request. Please try again.