From 63dbfedbc1217748cf1bd34a78c702ef8ea0d4fe Mon Sep 17 00:00:00 2001 From: Kassio Borges Date: Tue, 3 Jun 2014 19:26:02 -0300 Subject: [PATCH] Fix(again) highlight function to work with options --- README.md | 5 +++++ autoload/ack.vim | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5230de69..894734a6 100644 --- a/README.md +++ b/README.md @@ -119,3 +119,8 @@ with versions that does not have this variable. * Fixes highlight function to work when user passes options. Ex.: Ack -i test Thank's @mannih. (#131, #134) + +### 1.0.7 + +* Fixes highlight function to work when passes more than one option, or options +with double dashes(--option) Thank's to @MiguelLatorre and @mannih diff --git a/autoload/ack.vim b/autoload/ack.vim index 461a3456..0cec7c9c 100644 --- a/autoload/ack.vim +++ b/autoload/ack.vim @@ -111,7 +111,7 @@ function! s:highlight(args) return endif - let @/ = matchstr(a:args, "\\v\\zs[^-'\" ]\\w+\>|['\"]\\zs.{-}\\ze['\"]") + let @/ = matchstr(a:args, "\\v(-{1,2})@|['\"]\\zs.{-}\\ze['\"]") call feedkeys(":let &l:hlsearch=1 \| echo \", "n") endfunction