-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
actions.close
mapping leaves a terminal in insert mode
#2785
Comments
This is also happening to me when i |
@ten3roberts thanks for the report, I'm able to reproduce this @robbplo I'm not able to reproduce this outside of Either way, both issues are somewhat related to #2766 |
@jamestrew Hit the nail on the head, it no longer happens when i disable barbar.nvim. |
see the following resources: - taketwo@d571ecd - nvim-telescope/telescope.nvim#2766 - nvim-telescope/telescope.nvim#2785
Can people try out this PR? #2850 I may have accidentally fixed this 😁 edit: nope, nvm don't bother |
I tested it and it does not fix the issue. As far as I can tell the added call to vim.schedule(function()
vim.cmd [[stopinsert]]
end) to the end of telescope.nvim/lua/telescope/actions/set.lua Line 209 in 7264df4 normal mode, it does however not reset cursor position.
Edit: Ok I should have read the issue more closely. The issue I have, as I said in #2766, is with |
@tbung yeah you're right in that it doesn't fix it. Thanks for trying. I was messing up the testing. Let me think about this some more. There's a ton of flaky behavior around switching modes when opening/closing telescope. I need to be careful I don't break something trying to fix something else. I'm not even fully convinced this isn't a neovim core issue (which has happened before). |
Yeah this is actually reproducible without telescope. I'll create an issue with neovim and see if this is something that can be addressed upstream. edit: |
This looks to be fixed upstream via neovim/neovim#27033 |
Description
Using
actions.close
in the insert mappings for the telescope prompt does not restore the mode of the underlying terminal buffer.Neovim version
Operating system and version
macOS Sonoma
Telescope version / branch / rev
telescope 0.1.4
checkhealth telescope
Steps to reproduce
:term
(opens in normal mode):Telescope find_files
<esc>
The terminal is now in insert/terminal mode, instead of normal mode.
Non terminal buffers correcly restore their mode to normal.
Expected behavior
The terminal buffer is restored to normal mode
Actual behavior
The terminal is left in the mode of the telescope prompt, I.e; insert mode
Minimal config
The text was updated successfully, but these errors were encountered: