Skip to content

bug(picker): blank row renders above first list item (redraw artifact, not buffer content) on Neovim nightly #2947

Description

@tuxerrante

Description

An empty/blank first row appears at the top of the picker list (reproduced with recent, explorer, and other picker sources), positioned between the input row and the first real result. It is purely a rendering artifact: the underlying snacks_picker_list buffer content is correct (verified headlessly, see below) — there is no blank/empty line in the actual buffer.

Observed behavior:

  • Opening the Explorer in a fresh split sometimes shows no gap initially, but scrolling with arrow keys / j/k makes the blank row appear.
  • Opening recent picker (Snacks.picker.recent()) shows a lone empty row (just an icon, no text) above the first real result.
  • Confirmed via headless dump of the snacks_picker_list buffer lines that the buffer itself has NO blank line — line 1 is real content (e.g. a valid recent file path). So the blank line the user sees is a redraw/compositing artifact of the floating window, not a data/logic bug in the finder/list.

Reproduction

vim.defer_fn(function()
  Snacks.picker.recent()
  vim.defer_fn(function()
    for _, win in ipairs(vim.api.nvim_list_wins()) do
      local buf = vim.api.nvim_win_get_buf(win)
      if vim.bo[buf].filetype == "snacks_picker_list" then
        print(vim.inspect(vim.api.nvim_buf_get_lines(buf, 0, 5, false)))
      end
    end
  end, 1500)
end, 1000)

Buffer lines returned are all non-blank/real content, yet visually a blank row renders above the first item.

Environment

  • snacks.nvim commit: 882c996cf28183f4d63640de0b4c02ec886d01f2 (branch main, latest as of 2026-05-25 — confirmed no newer commits on origin/main at time of testing)
  • Neovim version: NVIM v0.13.0-dev-1479+g47ce0d1f87-Homebrew (nightly/HEAD build via brew install neovim --HEAD)
  • Also reproduced on an earlier nightly commit (v0.13.0-dev-1469+g16a1d203e9), so not fixed by updating to a newer nightly build in this range.
  • OS: macOS (Homebrew, arm64)
  • Config: LazyVim-based (https://github.com/tuxerrante/dot-config-nvim), no custom picker layout/border/scrolloff overrides — only sources.files.hidden/ignored customized in the LazyVim snacks.nvim spec.

Possible RCA

Since the buffer content is confirmed correct, this looks like a compositing/redraw issue in how the floating list window is drawn relative to the input window on this Neovim nightly build — possibly related to changes in floating-window border/decoration redraw internals between nightly builds (given it appears/disappears based on scroll state, this could be an off-by-one in the window's topline/viewport redraw rather than in snacks.nvim's own list-resize logic, since fix(picker.list): resize when needed (df018ed, closes #2290) is already included in the tested commit).

Happy to provide more headless repro output or test candidate patches.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions