Skip to content

Conversation

dtor
Copy link

@dtor dtor commented Jul 3, 2025

Description

Make sure to move the cursor to the row selected by self:_do_selection() instead of placing it onto the first (or last, depending on the sorting method) line of the picker window.

Fixes #3492

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

With a custom picker that generates a list of stgit patches and uses default_slection_index to select the "top" patch of the stack. Number of patches is sufficiently large.

Make sure to move the cursor to the row selected by self:_do_selection()
instead of placing it onto the first (or last, depending on the sorting
method) line of the picker window.

Fixes nvim-telescope#3492
@dtor dtor force-pushed the fix-default-slection-scroll branch from 8f6d104 to b759320 Compare July 4, 2025 00:25
@dtor
Copy link
Author

dtor commented Jul 4, 2025

Updated the commit to not error when a picker has no results.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specifying default_selection_index that is larger than picker window does not work

1 participant