From 303bceff1c8ab1145d114083582b1aeac9de7a85 Mon Sep 17 00:00:00 2001 From: Kassio Borges Date: Wed, 11 Jun 2014 13:59:35 -0300 Subject: [PATCH] Fix highlight, now using negative looking behind --- README.md | 5 +++++ autoload/ack.vim | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 894734a6..008fb3dd 100644 --- a/README.md +++ b/README.md @@ -124,3 +124,8 @@ with versions that does not have this variable. * Fixes highlight function to work when passes more than one option, or options with double dashes(--option) Thank's to @MiguelLatorre and @mannih + +### 1.0.8 + +* Fixes (again) highlight, now using negative look behind. +* Change mappings `o` and `O` to behave as documented diff --git a/autoload/ack.vim b/autoload/ack.vim index 0d791d47..fae73b1f 100644 --- a/autoload/ack.vim +++ b/autoload/ack.vim @@ -8,6 +8,7 @@ function! ack#Ack(cmd, args) else let l:grepargs = a:args . join(a:000, ' ') end + echom l:grepargs let l:ackprg_run = g:ackprg " Format, used to manage column jump @@ -111,7 +112,7 @@ function! s:highlight(args) return endif - let @/ = matchstr(a:args, "\\v[^-]{1,2}\\s\\zs\\w+\>|['\"]\\zs.{-}\\ze['\"]") + let @/ = matchstr(a:args, "\\v(-)\@", "n") endfunction