-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zellij + Noice.nvim causes screen flickering. #3208
Comments
I also have this cursor flickering issue when using Zellij with Neovim. I've found that it's not necessarily due with noice.nvim, as it also happens if I have a few floating windows open at the same time. |
Any update for this? (I have flickering even when disalbling noice.) I didn't have any flickering on v0.39 but when I updated to v0.40 it started to happen for me. |
A few things:
Thanks! |
This isn't a full reproduction, but I've found that https://github.com/j-hui/fidget.nvim causing LSP status messages to come through (like for rust-analyzer) causes this flickering intensely with Zellij, and I also have noice.nvim turned on. I also see it with tmux but significantly less, and I don't see it all just on All of this is happening with Update: It seems that disabling all of I'm guessing this doesn't have to do specifically with |
Another thing I found: doing I realized that doing a pane resize in Zellij was causing the same cursor flickering that I was noticing with noice, so that may be an even easier predictable way to trigger the issue. Unfortunately, running |
@johnpyp |
Hi friends, Thanks to everyone for pointing out their reproductions and experiences here, but at this point I don't think this adds anything to the discussion. This issue is 99% a misimplementation of CSI 2026 (synchronized renders) by either noice or nvim (as demonstrated by shutting them down mitigating this issue). I'm happy to look into this on the Zellij side if (and only if) I am given a dump of ANSI instructions (as specified in the ISSUE_TEMPLATE) that can be I don't want to lock this issue for further comments, but I'm sorry - I'm going to have to delete further comments that only retell the same experience (even if they do include very thoughtful and detailed reconstructions or videos). I don't mean to shut anyone up or be ungrateful for your details, but such comments don't add to the discussion and get in the way of solving the issue by pushing away this very explicit requirement of mine expressed here and in the comment above. Thank you for understanding. |
Hello @imsnif Thank you for your answer! I can successfully cat this file on my computer and see the state of the terminal captured. Size of my terminal:
Let me know how I can help you to debug this. |
Just so you know I posted an issue on |
Hey, for the record: I looked at the dump and the CSI 2026 appears at the beginning and end properly (this is a dump of the whole terminal state, not just one frame - indeed the CSI 2026 serves as the definition of the frame start and end). I I'm happy to look into this further and am not trying to throw blame on anyone, but I'm still not certain the bug is in Zellij and I'm going to need more legwork in the reproduction. |
I manage to reproduce the issue with this minimal neovim configuration: -- minimal.lua file
function open_floating_window()
-- Get the current buffer handle
local buf = vim.api.nvim_create_buf(false, true)
-- Define the window options
local opts = {
relative = "editor",
width = math.floor(vim.o.columns * 0.8),
height = math.floor(vim.o.lines * 0.8),
col = math.floor(vim.o.columns * 0.1),
row = math.floor(vim.o.lines * 0.1),
anchor = "NW",
style = "minimal",
}
-- Create the window
vim.api.nvim_open_win(buf, true, opts)
end
-- Open the window with "f" key in normal mode
vim.api.nvim_set_keymap(
"n",
"f",
":lua open_floating_window()<CR>",
{ noremap = true, silent = true }
) Start Disabling |
Not reproducing I'm afraid... 2024-06-20.18-39-23.mp4Are you on the latest version of Alacritty? They only implemented support for synchronized renders in 0.13.0 iirc. |
@imsnif And when you spam "f" the cursor isn't blinking at all?
Screen.Recording.2024-06-20.at.21.52.54.mov |
It reproduced for me too, using the minimal.lua. |
Alright, I got it! This was indeed an issue in the Zellij rendering engine, as nvim here was correctly sending us a single frame in this case and we were issuing two renders for it (one for the frame, one for the cursor at an arbitrary time within the frame). That's why the flickering only happened sometimes, and why I had trouble reproducing it even with the ANSI dump. The reproduction with the single lua file was a good call @pierregoutheraud, thanks! It was a good compromise that didn't require me to do a PhD in neovim plugin installation/configuration as these reproductions often do :) I am but a simple vim user who doesn't even use static code analysis when developing. This will be released in the next version, which I unfortunately do not yet have an ETA for. You can always use the version from |
Thank you very much @imsnif, zellij is awesome. |
@imsnif Out of curiosity I built the Screen.Recording.2024-06-21.at.15.01.48.mov |
For the removal of doubt: I'm not reproducing this (otherwise I wouldn't have issued the fix). Only thing I can think of is to make sure you built correctly following the instructions in CONTRIBUTING.md (and of course the other stipulations from above). This issue is solved, if you find other issues, please open them as separate issues with either an ANSI dump (the one you attached above seems correct and without issues) or a reproduction similar to your previous one. Please be 100% sure in your reproduction, this is a large project and I don't usually have the capacity for this back-and-forth. |
@imsnif @pierregoutheraud not sure if this helps, but for me the flicker is gone when |
@imsnif My bad, I had added |
This issue is documented in an issue for Noice, however, it is not reproducible when outside of Zellij.
Link to the original issue: folke/noice.nvim#658
I have had the issue occur on both Mac and WSL.
The text was updated successfully, but these errors were encountered: