Skip to content

Commit

Permalink
Use handlers with Dispatch, not plain copen
Browse files Browse the repository at this point in the history
Otherwise e.g. when you have vertical splits open, the quickfix list
will not span the full bottom of the Vim window like standard ack.vim
behavior. Also broke location list entirely...
  • Loading branch information
ches committed Feb 12, 2015
1 parent 303bcef commit c40c252
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion autoload/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function! ack#Ack(cmd, args)
if !g:ack_use_dispatch
call ack#show_results()
else
copen
execute s:handler
endif
call <SID>apply_maps()
call <SID>highlight(l:grepargs)
Expand Down
8 changes: 7 additions & 1 deletion plugin/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ if !exists("g:ack_apply_lmappings")
let g:ack_apply_lmappings = !exists("g:ack_lhandler")
endif

if !exists("g:ack_use_dispatch")
if exists("g:ack_use_dispatch")
if g:ack_use_dispatch && !exists(":Dispatch")
let msg = "Ack: Dispatch not loaded! Falling back to g:ack_use_dispatch = 0."
echohl WarningMsg | echom msg | echohl None
let g:ack_use_dispatch = 0
endif
else
let g:ack_use_dispatch = 0
end

Expand Down

0 comments on commit c40c252

Please sign in to comment.