ldelossa / gh.nvim

A fully featured GitHub integration for performing code reviews in Neovim.
MIT License
520 stars 24 forks source link

cmdheigh=0 flickering on neovim/neovim#20644 #74

Open arsham opened 1 year ago

arsham commented 1 year ago

On startup the statusbar flickers. See for more information.

Steps to reproduce

Compile neovim with this. Start neovim.

ldelossa commented 1 year ago

Gh.nvim utilizes vim.api.nvim_echo() extensively to write info to the status line. I havent played with this setting much, but I do remember that the api didnt play well with cmdheight set to zero. Could this be related to the issue?

arsham commented 1 year ago

Good point there. Let me check if that API causes the flickering.

arsham commented 1 year ago

Yep, that's it!

ldelossa commented 1 year ago

Yeah, im not sure how the Neovim core team advises to handle this. From my point of view that new cmdheight just kinda breaks the echo api at times.

I havent gotten around to removing the echo api usage, one because i personally like and and two because im waiting to see if neovim core fixes little issues like this.

arsham commented 1 year ago

Fair enough. One thing though, would there an autocmd firing at some point that would echo an empty string? I'm saying this because when this plugin loads, there are no visible characters echoed. I did the following and the end result was the same:

vim.defer_fn(function()
  vim.api.nvim_echo({{" ", "LTInfo"}}, false, {})
end, 100)

I'm not saying this is the issue, but it is a shot in a dark. Anything happens after that you can't do anything about anyway.

ldelossa commented 1 year ago

Hmm. I thought we remove any echo commands that would happen on startup.

When gh.nvim starts, it will call out to the ghcli to cache the current user info, but, we no longer create a echo for that. I can take a deeper look however.