Skip to content

Commit

Permalink
Fix ackpreview when there are splits
Browse files Browse the repository at this point in the history
When previewing we want to open the result and then move back to the
results buffer, the previous window (`:h CTRL-W_p`) -- not cycle through
windows (`:h CTRL-W_w`) which would include other splits besides the
results list.

Fixes #238
  • Loading branch information
ches committed Feb 27, 2018
1 parent 6e04746 commit 36e40f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ function! s:ApplyMappings() "{{{
endif

if exists("g:ackpreview") " if auto preview in on, remap j and k keys
nnoremap <buffer> <silent> j j<CR><C-W><C-W>
nnoremap <buffer> <silent> k k<CR><C-W><C-W>
nnoremap <buffer> <silent> j j<CR><C-W><C-P>
nnoremap <buffer> <silent> k k<CR><C-W><C-P>
nmap <buffer> <silent> <Down> j
nmap <buffer> <silent> <Up> k
endif
Expand Down

0 comments on commit 36e40f9

Please sign in to comment.