Closed gotgenes closed 3 weeks ago
Install Noice with LazyVim
I need a proper repro. Not a LAzyVim install.
Does the issue trigger with the provided repro?
And like I said, please use a recent nightly to reproduce.
Here is a repo just using minimal init.lua
to reproduce
I am using Windows 11
Can reproduce with Wezterm and Windows 11
Repo: https://github.com/JustBarnt/nvim-noice-min
: nvim -v
NVIM v0.11.0-dev-783+g0ade8fed1
Build type: RelWithDebInfo
LuaJIT 2.1.1724512491
Run "nvim -V1 -v" for more info
Edit: I also tested this in Alacritty as well which the issue also exists there as well.
@JustBarnt I tried your minimal repo but could not reproduce. I'm using same version of Neovim like you on Linux Mint 21.3 and latest Kitty terminal. Here's a screencast showing the process
@dpetka2001 Correct this appears to be an issue that seems limited to Mac OS and Windows for some reason.
I can reproduce the issue within Wezterm and Windows Terminal
I updated my original comment to clarify
@folke Thanks for your reply.
Install Noice with LazyVim
I need a proper repro. Not a LAzyVim install.
Does the issue trigger with the provided repro?
Yes, it does. My apologies. In my haste, I forgot to update the instructions to say use the minimal repro. I have edited to correct this.
And like I said, please use a recent nightly to reproduce.
I also reproduced on nightly from Neovim's releases:
NVIM v0.11.0-dev-783+g0ade8fed1
Build type: RelWithDebInfo
LuaJIT 2.1.1724512491
Run "nvim -V1 -v" for more info
I'm also confirming that pinning noice to v4.4.7 makes the flickering behavior go away—in both stable and nightly Neovim:
vim.env.LAZY_STDPATH = '.repro'
load(vim.fn.system('curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua'))()
require('lazy.minit').repro({
spec = {
{ 'folke/noice.nvim', tag = 'v4.4.7', opts = {} },
-- add any other plugins here
},
})
Yes, I just tried with latest neovim-nightly
and wezterm-nightly
installed via scoop
on Windows 10 and I can confirm that the issue exists on Windows. Really strange.
I'm also on linux.
Will look into it tomorrow to see what's happening on Windows.
I'm not going to revert to v4.4.7. The way that used to work was one big hack by hooking into redraw calls. The new way is the way it should work.
@folke I actually think I just figured out the cause! Currently testing on Windows with all mentioned terminals! I just need someone to be able to test the PR within linux (to confirm there are no regressions) and on Mac to confirm it fixed it there as well
I tested the linked PR locally and from my short testing I don't see any regression on Linux. Hope I didn't miss something. Folke obviously will have a better opinion on this.
Yeah indeed, that cursor = true
shouldn't be there.
But there's some thing I want to check first.
Yeah setting cursor to false works as well.
@JustBarnt what was the thing that you found to fix it?
@folke I found that adding win = Cmdline.win()
also fixes the issue.
Not sure what the correct fix per say is.
Although it sounds like cursor = false
is the correct fix
if not Util.is_search() then
if vim.api.nvim__redraw then
vim.api.nvim__redraw({ flush = true, cursor = true, win = Cmdline.win() })
else
vim.cmd.redraw()
end
end
@JustBarnt that's also a good idea, but I think it's not really needed.
I just pushed some changes, so would be great if everyone could check if the problem is now gone.
@folke Yeah after I read you comment that cursor = true
wasn't supposed to be there I had assumed what I had found isn't necessarily the right fix.
I can confirm on Windows with Wezterm, Windows Terminal, and Alacritty the issue is fixed via commit 3373ab5
Great :) The issue was due to a bad copy-paste I did from the cmdline code.
Glad it's fixed!
But still weird, that the problem didn't show on Linux. The code was indeed just wrong and I would have expected the cursor to be flickering between the real position and the cmdline. But for some reason that didn't happen on Linux. Probably some debounce somewhere specifc to Linux.
Fix confirmed on my system, too. Thanks, @folke!
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.1 Release
Operating system/version
MacOS 14.6.1
Describe the bug
Opening a new issue per this comment in #923.
Steps To Reproduce
:
Expected Behavior
The cursor stays rendered in the command prompt, and does not flicker around.
Repro