git.nvim icon indicating copy to clipboard operation
git.nvim copied to clipboard

Re-use buffer after opening blame commit to prevent polluting the jumplist?

Open gstokkink opened this issue 3 years ago • 1 comments

First of all, nice plugin! It seems to replace both vim-fugitive and vim-rhubarb.

I noticed a small issue after opening a blame commit (original mapping: <CR>). In vim-fugitive, I could simply use the alternative file command (default CTRL-^) to return to the original file after opening the blame commit.. However, this does not seem to work with your plugin. Turns out your plugin creates a new buffer (I think, not sure) instead, which also adds an entry to the jumplist. Obviously I could then use CTRL-O instead to return the original file, but maybe it's better to re-use the existing buffer instead, and not add an entry to the jumplist. Especially since you end up with an empty buffer when jumping back to the blame commit through the jumplist.

Hopefully my explanation is clear :)

gstokkink avatar Aug 21 '22 17:08 gstokkink

Thank you for creating the issue. Your explanation is obvious; I can reproduce it on my machine... I will have a look and have an improvement soon... Thank you...

dinhhuy258 avatar Aug 22 '22 10:08 dinhhuy258