Skip to content
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

bug: Cursor flickering in cmdline #931

Closed
4 tasks done
TommyCox opened this issue Aug 13, 2024 · 15 comments
Closed
4 tasks done

bug: Cursor flickering in cmdline #931

TommyCox opened this issue Aug 13, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@TommyCox
Copy link

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.1

Operating system/version

Linux 6.6.41

Describe the bug

Cusor flickers in cmdline with "g/pattern" commands or "q:" command-line window open.

Steps To Reproduce

  1. Open neovim with minimal init.
  2. Ensure noice.nvim is installed and running.
  3. Press :g/a.
  4. Cursor begins to flicker.

Expected Behavior

Cursor does not flicker.

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", 
      event = "VeryLazy",
      dependencies = { "MunifTanjim/nui.nvim" },
      opts = {
        cmdline = {
          view = "cmdline",
        },
      },
    }
  },
})
@TommyCox TommyCox added the bug Something isn't working label Aug 13, 2024
@TommyCox
Copy link
Author

Probably related to #923.
The workaround of downgrading to 4.4.7 also worked for this issue.

@Nemexia
Copy link

Nemexia commented Aug 20, 2024

i have the same problem on windows terminal using PowerShell

@mkubasz
Copy link

mkubasz commented Aug 20, 2024

https://www.reddit.com/r/neovim/comments/1ewaq2u/comment/liy9hsu/?context=3
Same in my clean LazyVim instalation.

@cjasaMHC
Copy link

Ok, glad I'm not the only one noticing this. Same for NvChad with clean install

@panboo0106
Copy link

same here

1 similar comment
@iamxiaojianzheng
Copy link

same here

@renxzen
Copy link

renxzen commented Sep 1, 2024

2024-09-01_00-56-02.mp4

presenting the same problem

@Nemexia
Copy link

Nemexia commented Sep 1, 2024

unlike top video, mine starts exactly as i go to the bar

@azaidrahman
Copy link

Same here, also on Windows Terminal Powershell

#935

@Riddlerrr
Copy link

Same for me: neovim 10.1, macos

@echaya
Copy link

echaya commented Sep 9, 2024

Same here, on Wezterm on windows and WSL

@fredizzimo
Copy link

fredizzimo commented Sep 18, 2024

Does this block of code need to call nvim__redraw(flush = true)? I think that's the main reason for the flickering, based on my initial analysis based on the Neovide logs here neovide/neovide#2735 (comment)

From the UI perspective a flush means that there's a valid UI state that should be shown. But here it's first flushing with a mouse movement and then move the mouse again.

vim.schedule_wrap(function()
      if not Util.is_search() then
        if vim.api.nvim__redraw then
          vim.api.nvim__redraw({ flush = true, cursor = true })
        else
          vim.cmd.redraw()
        end
      end
      Cmdline.fix_cursor()
    end)
end

@folke
Copy link
Owner

folke commented Sep 18, 2024

@fredizzimo nope, that was indeed wrong! Did a bad copy-paste from the cmdline code and forgot to remove the cursor = true.

Just pushed a new release, so should be fixed.

Weirdly enough the issue didn't show on Linux, but it did on Windows, MacOS and in Neovide.

@folke folke closed this as completed Sep 18, 2024
@MarcoBuess
Copy link

Can confirm its fixed. Tyvm @folke @fredizzimo ❤️

@Riddlerrr
Copy link

Thank you @folke, I can confirm it is fixed on macos + neovim 👍

It was really painful to use cmdline with the flickering cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.