Did you check docs and existing issues?
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:
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:
|
vim.api.nvim_create_autocmd("WinScrolled", { |
|
group = self.augroup, |
|
pattern = tostring(self.winnr), |
|
callback = function() |
|
self:update() |
|
end, |
|
}) |
event dispatch:
|
function M.on_select(state, redraw) |
|
if M.menu then |
|
if state.selected == -1 then |
|
vim.wo[M.menu.winid].cursorline = false |
|
else |
|
vim.wo[M.menu.winid].cursorline = true |
|
vim.api.nvim_win_set_cursor(M.menu.winid, { state.selected + 1, 0 }) |
|
vim.api.nvim_exec_autocmds("WinScrolled", { modeline = false }) |
|
if redraw ~= false and Util.is_blocking() then |
|
Util.redraw() |
|
end |
|
end |
|
end |
|
end |
Adding the win id to nvim_exec_autocmds fixes it:
vim.api.nvim_exec_autocmds("WinScrolled", { pattern = tostring(M.menu.winid), modeline = false })
I'll submit a PR
Steps To Reproduce
- start typing a command
- press tab multiple times
- 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
},
})
Did you check docs and existing issues?
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:
I spent some time tracing it through and the scrollbar element isn't getting the
WinScrolledevent because the autocmd is set up with a pattern but the event is dispatched without one.autocmd setup:
noice.nvim/lua/noice/view/scrollbar.lua
Lines 48 to 54 in 0427460
event dispatch:
noice.nvim/lua/noice/ui/popupmenu/nui.lua
Lines 245 to 258 in 0427460
Adding the win id to
nvim_exec_autocmdsfixes it:I'll submit a PR
Steps To Reproduce
Expected Behavior
The scroll thumb should indicate scroll position
Repro