snacks.nvim
snacks.nvim copied to clipboard
bug: Traversing the search results in picker grep with wrap enabled in a narrow windows doesn't show all items
Did you check docs and existing issues?
- [x] I have read all the snacks.nvim docs
- [x] I have updated the plugin to the latest version before submitting this issue
- [x] I have searched the existing issues of snacks.nvim
- [x] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.11.0-dev-1771+gbd0a65bc15-Homebrew
Operating system/version
Ubuntu 2410
Describe the bug
standing at the first item on the list
pressing up arrow one time
the last items are not visible, how many are missing depends on how many items are wrapped. seems to be related to the height to the item being different because of the wrapped text
Steps To Reproduce
- enable wrap in the config
opts.picker.win.list.wo.wrap = true
- resize the screen just enough so that at least one item in the list is wrapped
-
sg open grep picker - enable preview if not enabled already
- press the up arrow key to go to the bottom of the list, the last entry is not visible.
Expected Behavior
to see all items
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/snacks.nvim", opts = {} },
-- add any other plugins here
},
})