jesseduffield / lazygit

simple terminal UI for git commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why does the nvim window not refresh?

505384662 opened this issue · comments

QQ.20220618150942.mp4

Why does the nvim window not refresh?
step:

  1. Press ,gg to open lazgit
  2. Press d to clear modification record
  3. press q to close lazgit
  4. view nvim Windows
  5. But not cleared

If MP4 video cannot be played, please download and watch it~~

Does nvim have something like :redraw!?

image
Here it is, but not implemented~

What do you mean it's not implemented? What happens if you type :redraw!? Or :mode?

I mean, I wrote redraw! command
But I didn't execute this command by
image

That command is irrelevant, it's not one of nvim.

In any case, this isn't a lazygit issue, this is due to redrawing of vim/nvim.

Look into :h redraw and/or :h lazyredraw.

I just read this help
but
I don't quite understand what you mean
You mean to let me set this command set lazyredraw in vim/nvim

Try that, but redrawing manually (however that's done in nvim) should help as well

I tried, but I still can't. It's so tangled。。

Alright, what is ,gg mapped to? Just so I can try to reproduce it.

Which nvim version are you using? Have you tried with a minimal vimrc?

Just wait a while~
image
nnoremap <silent><leader>gg <Cmd>lua _LAZYGIT_TOGGLE()<CR>
image
NVIM v0.7.0
If you need all configuration
This is my GitHub nvim configuration
https://github.com/505384662/nvim/tree/master/.config/nvim
Thank you very much for your hard work~~

I just now watched the video, it's not due to rendering, but due to nvim not reloading the file.

For some reason it doesn't register that the file has been changed, even though you have autoread set. I'll look into it, in the meantime you can just :e after closing lazygit.

I tried this command :e before
This is my previous video
https://user-images.githubusercontent.com/31720616/174461985-ea71c964-b212-41a7-8467-66686216c628.mp4
But I hope to refresh the nvim Windows when I press q to close lazygit
I hope you can let me know after adding it~
Thanks for answering questions~~

ezoic increase your site revenue