folke / noice.nvim

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

`command-preview` block cursor refresh of cmdline when move #103

Closed wangl-cc closed 1 year ago

wangl-cc commented 1 year ago

Describe the bug When enter a command with command-preview like :s/foo/bar, the cursor of cmdline will not refresh when move, until insert or delete.

Which version of Neovim are you using? NVIM v0.9.0-dev-150+g2f9b94a26

To Reproduce Steps to reproduce the behavior:

  1. Enter a command with command-preview like :s/foo/bar,
  2. Try move cursor.

Expected Behavior The cursor will refresh.

Screenshots

https://user-images.githubusercontent.com/40141251/197363853-cfffcb7c-94ff-44fd-8e6e-55c9ba371509.mov

Noice Log No log during reproducing.

folke commented 1 year ago

That's a known issue on the Neovim side. See the tracking issue for noice. It's a problem with substitute, seems to work fine with other command preview stuff

folke commented 1 year ago

https://github.com/neovim/neovim/issues/20463

wangl-cc commented 1 year ago

My bad, forget to check known issues.

b0o commented 4 months ago

Seems like this is happening again when using noice with inc-rename on NVIM v0.11.0-dev-168+ge20c5fba2c.

folke commented 4 months ago

Yes indeed. changing the cmdline is working correctly during substitute on nightly, but moving does not. feel free to post an issue upstream.

b0o commented 4 months ago

Seems to be fixed now, thanks @folke!

folke commented 4 months ago

Yes indeed! We're using real (fake) cursors now in noice. It uses the Neovim API to draw the real cursor in the noice windows, but it's still fake, since those windows are not the current window.

Only drawback is that if a redraw happens somewhere not by noice, then the cursor may disappear (briefly).