Skip to content

Commit 303bcef

Browse files
committed
Fix highlight, now using negative looking behind
1 parent b165154 commit 303bcef

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,8 @@ with versions that does not have this variable.
124124

125125
* Fixes highlight function to work when passes more than one option, or options
126126
with double dashes(--option) Thank's to @MiguelLatorre and @mannih
127+
128+
### 1.0.8
129+
130+
* Fixes (again) highlight, now using negative look behind.
131+
* Change mappings `o` and `O` to behave as documented

autoload/ack.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function! ack#Ack(cmd, args)
88
else
99
let l:grepargs = a:args . join(a:000, ' ')
1010
end
11+
echom l:grepargs
1112
let l:ackprg_run = g:ackprg
1213

1314
" Format, used to manage column jump
@@ -111,7 +112,7 @@ function! s:highlight(args)
111112
return
112113
endif
113114

114-
let @/ = matchstr(a:args, "\\v[^-]{1,2}\\s\\zs\\w+\>|['\"]\\zs.{-}\\ze['\"]")
115+
let @/ = matchstr(a:args, "\\v(-)\@<!(\<)\@<=\\w+|['\"]\\zs.{-}\\ze['\"]")
115116
call feedkeys(":let &l:hlsearch=1 \| echo \<CR>", "n")
116117
endfunction
117118

0 commit comments

Comments
 (0)