snacks.nvim icon indicating copy to clipboard operation
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

Open lalvarezt opened this issue 1 week ago • 0 comments

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

Image

pressing up arrow one time

Image

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

  1. enable wrap in the configopts.picker.win.list.wo.wrap = true
  2. resize the screen just enough so that at least one item in the list is wrapped
  3. sg open grep picker
  4. enable preview if not enabled already
  5. 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
  },
})

lalvarezt avatar Feb 17 '25 15:02 lalvarezt