Skip to content

Commit

Permalink
Fix highlight, now using negative looking behind
Browse files Browse the repository at this point in the history
  • Loading branch information
kassio committed Jun 11, 2014
1 parent b165154 commit 303bcef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion autoload/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(-)\@<!(\<)\@<=\\w+|['\"]\\zs.{-}\\ze['\"]")
call feedkeys(":let &l:hlsearch=1 \| echo \<CR>", "n")
endfunction

Expand Down

0 comments on commit 303bcef

Please sign in to comment.