jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.38k stars 1.83k forks source link

NeoVim unexpected behavior #653

Closed ilovehans10 closed 3 years ago

ilovehans10 commented 4 years ago

Describe the bug When lazygit is used to edit a file it will cause NeoVim to open in search mode with /00/00 in the search bar and on the first time opening a file if the file has contents it will replace the first character with a "g"

To Reproduce Steps to reproduce the behavior:

  1. Open lazygit
  2. Hit e to edit file under the cursor
  3. NeoVim will open having changed the first character and in search mode

Expected behavior A clear and concise description of what you expected to happen. I expect for NeoVim to open as it normally does allow me to edit the file and allow me to save and exit.

Screenshots If applicable, add screenshots to help explain your problem.

https://asciinema.org/a/HYdeBetGT6yEkHQXRmRRMCki4

Desktop (please complete the following information):

Additional context I don't think that my vimrc has any effect on this status but it can be found here if there is any chance of that https://github.com/ilovehans10/dotfiles

ilovehans10 commented 4 years ago

Upon further testing I have come to realize that editing the file is not even necessary and that simply opening Lazygit closing Lazygit and opening NeoVim will lead to /00/00^G appearing in the search bar and the first character to be converted to a g as described in my initial report. I will be seeing if I can recreate this error on my home device when I have access to it, but until then any suggestions are appreciated. Edit: I have also added the fix suguested in #451, but it hasn't seemed to have any effect.

finviman commented 4 years ago

i encountered the same problem. i have tried vim8.1, it works fine but neovim doesn't if i uninstall coc nvim , this problem will gone.

finviman commented 4 years ago

Upon further testing I have come to realize that editing the file is not even necessary and that simply opening Lazygit closing Lazygit and opening NeoVim will lead to /00/00^G appearing in the search bar and the first character to be converted to a g as described in my initial report. I will be seeing if I can recreate this error on my home device when I have access to it, but until then any suggestions are appreciated. Edit: I have also added the fix suguested in #451, but it hasn't seemed to have any effect.

@ilovehans10 try to uninstall coc nvim , this problem will gone. But coc is a must have plugin.

steelsojka commented 4 years ago

I get this same problem in nvim without using coc.nvim, So I don't think this is related to coc.nvim.

jesseduffield commented 4 years ago

I am not really sure how to troubleshoot this one, I'm not well versed in neovim I'm afraid

ghost commented 3 years ago

I can't reproduce the issue outlined ^^ maybe update nvim and lazygit ?

jesseduffield commented 3 years ago

@ilovehans10 @steelsojka can you guys test this out on the latest release?

finviman commented 3 years ago

@ilovehans10 @steelsojka can you guys test this out on the latest release?

i have tried the lastest version,0.25.1, the problem is fixed.

jesseduffield commented 3 years ago

Alrighty, closing, but let me know if any more issues arise :)