Skip to content

Conversation

@olimorris
Copy link
Contributor

@olimorris olimorris commented Dec 9, 2025

An absolute delight in my day, was discovering require("aerial").snacks_picker(). Previously I'd used <cmd>AerialToggle float<CR> and whilst it was convenient, it took too many keystrokes to navigate to where I wanted to get to.

I started using Aerial and Snacks with CodeCompanion in order to navigate between H2 headers and I noticed that when selecting a symbol, I hit a position error and then when I reopened the CodeCompanion buffer (which circumvents the error it seems) and selected a symbol, the cursor moved to that symbol but in another window:

with error:

2025-12-09.23_14_54.-.Ghostty.mp4

This PR adds a confirm action to the Snacks picker which uses aerial's navigation module to determine where to move to:

without error:

2025-12-09.23_13_47.-.Ghostty.mp4

I haven't investigated further but it seemed that because CodeCompanion buffers are of the scratch variety and buftype=nofile, that interfered with something.

@github-actions github-actions bot requested a review from stevearc December 9, 2025 23:18
@stevearc
Copy link
Owner

I think this is because snacks picker has the truly puzzling default behavior of not opening the result in the window you just came from if that window is not a normal file. You can get around this by setting the option picker.main.file = false.

I'm happy to merge this anyway, though. Because of the weird defaults I'm sure other users will hit this, so it's good to be proactive. Thanks for the PR!

@stevearc stevearc merged commit 14102dc into stevearc:master Dec 19, 2025
6 of 9 checks passed
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.

2 participants