## Description
When using the git log sources, what are your thoughts on preserving the
sort order when matching? I find most often when I use this picker I
want to see results in reverse chronological order. For example, I like
to use the picker to review the commit log to see new features added to
a repo.
## Screenshots
When matching for `feat` in the snacks repo with current behavior, the
output is less than useful:
<img width="868" alt="image"
src="https://github.com/user-attachments/assets/ed0fdf2a-ee1f-4325-8c87-85911837a757"
/>
But with the proposed change, it's much more relevant:
<img width="868" alt="image"
src="https://github.com/user-attachments/assets/7052b353-d38d-4573-bf72-b0d99c21672d"
/>
## Alternatives
I can override in my config:
```lua
picker = {
sources = {
git_log = { sort = { fields = { "score:desc", "idx" } } },
git_log_file = { sort = { fields = { "score:desc", "idx" } } },
git_log_line = { sort = { fields = { "score:desc", "idx" } } },
},
},
```
## Description
**Problem**: Sometimes when entering Insert mode, I would get an error
message from image's `attach` function:
```
Error executing vim.schedule lua callback: ...cal/share/nvim/lazy/snacks.nvim/lua/snacks/image/doc.lua:215: scoped variable: Invalid buffer id: 88
stack traceback:
[C]: in function '__index'
...cal/share/nvim/lazy/snacks.nvim/lua/snacks/image/doc.lua:215: in function 'attach'
...al/share/nvim/lazy/snacks.nvim/lua/snacks/image/init.lua:174: in function <...al/share/nvim/lazy/snacks.nvim/lua/snacks/image/init.lua:173>
```
Looks like by the time the `attach` function is called, the buffer is no
longer valid. This is caused by using `vim.schedule`, which introduces a
small delay, during which the buffer can be deleted.
I suspect this is related to blink.cmp, but I cannot tell for certain.
**Solution**: Make sure that the buffer is valid using
`vim.api.nvim_buf_is_valid` inside the `vim.schedule` callback, before
calling `attach`.
With this fix, the error does not show up anymore.
## Screenshots
I used to get this error when entering Insert mode:
<img width="1474" alt="image"
src="https://github.com/user-attachments/assets/e256a36a-7ff6-4f84-8cdf-9e7b8132a3a1"
/>