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

feat: add user autocmd TelescopePickerClose #3182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emmanueltouzery
Copy link
Contributor

Description

Add a new user autocommand when the picker is closed.

I couldn't find a way to get notified when the telescope picker is closed because the picker "lost focus", in other words the user switched to another window.

I need this feature to fix: stevearc/dressing.nvim#150

In that case we need to invoke some code when the picker is closed, for any reason whatsoever. Currently dressing.nvim is broken if the user closes the picker by jumping to another window.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration

  • open telescope, close it by jumping to another window, the autocommand is invoked.
  • open telescope, close it by pressing escape, the autocommand is invoked.
  • open telescope, close it by accepting the selected entry (enter), the autocommand is invoked.

Configuration:

  • Neovim version (nvim --version): 0.10.0
  • Operating system and version: linux fedora 40

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

@diegodario88
Copy link

any chance we get this merged?

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.

Clicking outside telescope select window breaks all vim.ui.select actions
2 participants