noice.nvim icon indicating copy to clipboard operation
noice.nvim copied to clipboard

bug: cmdline completion popup scrollbar thumb doesn't scroll

Open cameronr opened this issue 8 months ago • 10 comments

Did you check docs and existing issues?

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

Neovim version (nvim -v)

v0.11.2

Operating system/version

MacOS 15.5

Describe the bug

The cmdline autocomplete window scrollbar thumb never moves, regardless of how far you scroll down:

Image

I spent some time tracing it through and the scrollbar element isn't getting the WinScrolled event because the autocmd is set up with a pattern but the event is dispatched without one.

autocmd setup: https://github.com/folke/noice.nvim/blob/0427460c2d7f673ad60eb02b35f5e9926cf67c59/lua/noice/view/scrollbar.lua#L48-L54

event dispatch: https://github.com/folke/noice.nvim/blob/0427460c2d7f673ad60eb02b35f5e9926cf67c59/lua/noice/ui/popupmenu/nui.lua#L245-L258

Adding the win id to nvim_exec_autocmds fixes it:

vim.api.nvim_exec_autocmds("WinScrolled", { pattern = tostring(M.menu.winid), modeline = false })
Image

I'll submit a PR

Steps To Reproduce

  1. start typing a command
  2. press tab multiple times
  3. observe that the scroll thumb does not move

Expected Behavior

The scroll thumb should indicate scroll position

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", opts = {} },
    -- add any other plugins here
  },
})

cameronr avatar Jul 05 '25 03:07 cameronr

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Aug 05 '25 02:08 github-actions[bot]

Still a bug

cameronr avatar Aug 09 '25 04:08 cameronr

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 10 '25 02:09 github-actions[bot]

Still a bug

cameronr avatar Sep 10 '25 03:09 cameronr

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Oct 12 '25 02:10 github-actions[bot]

Still a bug

cameronr avatar Oct 12 '25 02:10 cameronr

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 12 '25 02:11 github-actions[bot]

Still a bug

cameronr avatar Nov 12 '25 03:11 cameronr

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Dec 14 '25 02:12 github-actions[bot]

Still a bug

cameronr avatar Dec 14 '25 03:12 cameronr