Skip to content

Commit

Permalink
use &:lhlsearch instead of v:hlsearch, to keep compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kassio committed May 8, 2014
1 parent 5ddee51 commit c3e518c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,8 @@ foo' to search for #define foo. (From blueyed in issue #5.)
### 1.0.2

* Add compatibility with [vim-dispatch](https://github.com/tpope/vim-dispatch)

### 1.0.3

* Fixes #127. Use `&l:hlsearch` instead of `v:hlsearch` to keep compatibility
with versions that does not have this variable.
3 changes: 1 addition & 2 deletions autoload/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ function! s:highlight(args)
endif

let @/ = matchstr(a:args, "\\v\\w+\>|['\"]\\zs[^\"]+\\ze['\"]")
setlocal hlsearch
call feedkeys(":let v:hlsearch=1 \| echo \<CR>", "n")
call feedkeys(":let &l:hlsearch=1 \| echo \<CR>", "n")
endfunction

function! ack#AckFromSearch(cmd, args)
Expand Down

0 comments on commit c3e518c

Please sign in to comment.