folke / noice.nvim

💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
Apache License 2.0
4.31k stars 100 forks source link

bug: cursor flicker in cmdline #953

Open polirritmico opened 1 week ago

polirritmico commented 1 week ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.1 Build type: Release LuaJIT 2.1.1716656478

Operating system/version

Linux 6.6.52-gentoo

Describe the bug

Hi. This is probably the same problem as #931, but I'm opening a new issue because that fix (c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65) seems to be working for some users.

The cursor flickering occurs when searching with /. It's easier to trigger it on large files and windows, so I've added an htm test case to download in the repro script.

Reverting to 4.4.7 fixes the flickering completely.

Steps To Reproduce

  1. nvim -u repro.lua
  2. Press /e (search character e)
  3. Cursor begins to flicker on the command-line.
  4. If not, try with a bigger window and a smaller font size.

Expected Behavior

No cursor flickering

Repro

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",
    -- version = "4.4.7", -- lattest version without flicker
    event = "VeryLazy",
    dependencies = { "MunifTanjim/nui.nvim" },
    opts = {
      cmdline = { enabled = false },
      messages = { enabled = false },
    },
  },
})

if not vim.loop.fs_stat("11-h.htm") then
  vim.notify("Downloading test case...")
  vim.fn.system("wget https://www.gutenberg.org/files/11/11-h/11-h.htm")
end

vim.cmd("edit 11-h.htm")
polirritmico commented 22 hours ago

Still present with 4.5.2 and NVIM v0.10.2 Build type: Release LuaJIT 2.1.1716656478.