tanvirtin / vgit.nvim

Visual git plugin for Neovim
MIT License
585 stars 11 forks source link

How do I open a file from the project diff preview? #299

Closed vE5li closed 1 year ago

vE5li commented 1 year ago

The docs state that opening files is supported but I can't find the binding anywhere, neither in the documentation nor in the code.

aasutossh commented 1 year ago

Press Enter key?

vE5li commented 1 year ago

Well it's not working for me.

nickcercone commented 1 year ago

Same problem, I can only see the tree when calling VGit project_diff_preview and cannot open/preview any of the files/changes.

tanvirtin commented 1 year ago

Pressing enter on any preview window should work. Can you provide me with a minimal Neovim config to reproduce this issue with VGit version v0.2.0?

vE5li commented 1 year ago

I was able to figure out what caused this problem. I had some autocommands setup that looked like this:

vim.api.nvim_command([[
    autocmd WinEnter * set cul
    autocmd WinLeave * set nocul
]])

Putting this in an augroup already fixed it for me.

vE5li commented 1 year ago

@nickcercone do you maybe have a similar situation? If you also manage to fix it I will close this Issue

JulianH99 commented 1 year ago

I'm having the same issue, and not only on project diff but also when previewing commits for a file