Closed matejcik closed 6 years ago
I see what you mean in the case of g:ackpreview=1
—I don't use that feature, but it was doing something clearly wrong. Can you try updating the plugin now?
I'm afraid I can't reproduce what you describe when g:ackpreview=0
, we don't remap j and k at all in that case so there should be no way that the cursor focus jumps out of the results buffer.
If you still have a problem in either case after updating, let me know, maybe I need another explanation of how to reproduce.
I think I see the problem...
This commit does fix all issues I was experiencing (so thanks, and wow that was fast!).
However, actually setting g:ackpreview=0
does not disable preview! Because your code is checking for exists(ackpreview)
, which is true even with zero value. So either the check is wrong, or the documentation is misleading (stating that default is 0, when default is unset).
(I'm not sure why I saw different behavior. Probably I was confused and not reproducing my own steps correctly.)
to reproduce:
:Ack! word
, where "word" is something that exists in multiple files in your cwdexpected: cursor moves up/down on the result list, and the highlight in the current window follows the selected result
actual: when moving across file boundary, cursor skips to the right vsplit and moves there instead
with
g:ackpreview=1
this happens whenever you go from one file to another; without it, it only happens when going from a different file back to the currently open oneprobably related to #219 and #66 ?