Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Last search opens up with different order of results #1521

Open
4 tasks done
marcinjahn opened this issue Mar 7, 2025 · 4 comments
Open
4 tasks done

bug: Last search opens up with different order of results #1521

marcinjahn opened this issue Mar 7, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@marcinjahn
Copy link
Contributor

marcinjahn commented Mar 7, 2025

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.10.4

Operating system/version

Fedora 41

Describe the bug

When I hit <leader>sR to see the last picker results, I'd expect the results to be ordered the say as they were the last time I saw picker. This isn't the case, my file search shows results in different order than the last time I saw it.

Steps To Reproduce

  1. Look for some files with picker
  2. move the cursor down to some further resutl
  3. Close picker
  4. Reopen the last picker search

Expected Behavior

I'd expect the ordering of results to be exactly the same as the last time I saw them.

Repro

Just the default LazyVim setup

See #1521 (comment)

@marcinjahn marcinjahn added the bug Something isn't working label Mar 7, 2025
@dpetka2001
Copy link
Contributor

How exactly are you triggering this? I just tested with a fresh LazyVim installation and can't seem to reproduce. Screencast following

Screencast_2025-03-07-20-22-23.webm

@marcinjahn
Copy link
Contributor Author

marcinjahn commented Mar 7, 2025

Here's what I do:

Screencast.From.2025-03-07.20-22-25.mp4

In the end of the video, I'm opening the last picker multiple times (Resume as it's called in LazyVim), and you can see that the list has slightly different ordering (e.g., sometimes format.lua is above select.lua, and in other cases it's the opposite).

In this example, I used the Files picker, but I see the same behavior with Grep picker as well, so it seems to be general issue.

The command I run in the beginning:

docker run -w /root -it --rm alpine:edge sh -uelic '
     apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
     git clone https://github.com/LazyVim/starter ~/.config/nvim
     git clone https://github.com/folke/snacks.nvim.git
     cd snacks.nvim
     nvim
   '

@dpetka2001
Copy link
Contributor

dpetka2001 commented Mar 8, 2025

I followed the exact same steps writing picker in the input field, then going with the cursor to format.lua and opening the file in a buffer and then pressing <leader>sR for resume operation (I opened and closed the picker 5-6 times with resume), but mine the cursor always stays in the format.lua file and never goes to select.lua. Wonder what the difference might be.

@dpetka2001
Copy link
Contributor

Does :checkhealth snacks show any kind of error out of the ordinary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants