Skip to content

bug: Picker list abnormal cursor movement and flash integration in telescope (reverse) layout #2605

@Tokamak-USTC

Description

@Tokamak-USTC

Did you check docs and existing issues?

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

Neovim version (nvim -v)

0.11.4

Operating system/version

MacOS 15.7.1

Describe the bug

When using picker.list with the telescope layout (which uses a reverse list), cursor navigation within the list behaves abnormally. Additionally, integration with flash.nvim seems to jump to incorrect locations.

It appears that there is a mismatch between the item index (idx) and the visual row (row) when the list is in reverse mode, causing the cursor to land on the wrong item during jumps or navigation.

20251209-234419.mp4

Steps to Reproduce

  1. Configure snacks.picker to use the telescope layout (or any layout with reverse = true for the list).
  2. Open any picker (e.g., Snacks.picker.files()).
  3. Try to navigate using normal movement keys or trigger flash to jump to a specific item.
  4. Observe that the cursor lands on a different item than intended, or the movement direction feels inverted/offset.

My Configuration

I use Lazyvim default config and simply add snacks.lua in nvim/lua/plugins to demonstrate

-- snacks.lua
return {
  "folke/snacks.nvim",
  priority = 1000,
  lazy = false,
  ---@type snacks.Config
  opts = {
    picker = { layout = "telescope" },
  },
}

Expected Behavior

Cursor movement and flash jumps should target the correct visual item regardless of the list direction (reverse or normal).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleThis issue or PR has been inactive for a whilewontfixThis issue will not be fixed or implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions