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

fix(builtin.builtin): schedule opening next picker #3222

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

jamestrew
Copy link
Contributor

@jamestrew jamestrew commented Jul 25, 2024

Without scheduling, lots of vim state will be related to the builtin picker when the new picker is opened despite closing the builtin picker first and then opening a new picker.

This impacts state like vim.fn.mode(). If the builtin picker was closed in insert mode, the closing action should put you back in normal mode. But without scheduling, the next picker is opened before it does. So doing vim.fn.mode() in the subsequent picker will tell you, you're still in insert mode. Typically, when chaining pickers, you want the pre-telescope state, making the transitions between pickers seemless.

closes #3217

Without scheduling, lots of vim state will be related to the builtin
picker when the new picker is opened despite closing the builtin picker
first and then opening a new picker.

This impacts state like `vim.fn.mode()`. If the builtin picker was
closed in insert mode, the closing action _should_ put you back in
normal mode. But without scheduling, the next picker is opened before it
does. So doing `vim.fn.mode()` in the subsequent picker will tell you,
you're still in insert mode. Typically, when chaining pickers, you want
the pre-telescope state, making the transitions between pickers
seemless.
@jamestrew jamestrew force-pushed the builtin-picker-schedule branch from 409d18c to 83fcbe1 Compare July 25, 2024 01:39
@jamestrew jamestrew merged commit 47ab113 into nvim-telescope:master Jul 25, 2024
12 checks passed
@jamestrew jamestrew deleted the builtin-picker-schedule branch July 25, 2024 01:43
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.

builtin.symbols inserts symbol at wrong position
1 participant