fix(pickers): respect default_selection_index
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.
Test Results
6 files ±0 6 suites ±0 12s ⏱️ -1s 128 tests ±0 128 ✅ ±0 0 💤 ±0 0 ❌ ±0 746 runs ±0 746 ✅ ±0 0 💤 ±0 0 ❌ ±0
Results for commit a8e99e67. ± Comparison against base commit d090aa45.
:recycle: This comment has been updated with latest results.
expect!
How is this PR going now?
The ball is on the Neovim side, this needs to be merged, and the time for the 0.12 release is running out
- https://github.com/neovim/neovim/pull/35758
I have no idea what's holding it back, but since I'm no longer a Neovide maintainer, I'm not going to pressure it more, I have already pinged them twice https://github.com/neovim/neovim/pull/35758#issuecomment-3376460606, https://github.com/neovim/neovim/issues/35739#issuecomment-3409773317
thanks your work!
sir, this first api is merged from neovim. How can we enable it? Is the display of pre-edited IME supported by Neovide itself, or through a plugin?
I will update this PR first, and the plugin here https://github.com/kanium3/neovide-ime.nvim might also need updating, I'mnot sure.
expect!
This should now work with recent enough Neovim nightly builds. The API is completely disabled on older builds to prevent hangs.
@kanium3, you also need to change your plugin a bit. You need to check vim.in_fast_event(), to disable some functionality that is not allowed. But remember that you still want to support input during blocking message prompts for example.
https://github.com/kanium3/neovide-ime.nvim/issues/17#issuecomment-3619188604
That the neovide developers manage this plugin may be best.