-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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(terminal): avoid more busy_start
lacking busy_stop
#32509
Conversation
Problem: after neovim#32458, it may still be possible for `busy_start` UI events to be emitted without matching `busy_stop`s in the terminal. Solution: do `terminal_enter`'s cursor visibility check immediately after setting/restoring State so it occurs before events. This ensures that if pending escape sequences are processed while in `terminal_enter`, the cursor's initial visibility is set before `is_focused` is checked by `term_settermprop`. As a result, we can move the call to `showmode` back to where it was originally.
This problem still exist for me... I can stably reproduce with:
-- Run this file as `nvim --clean -u minimal.lua`
for name, url in pairs {
['flatten.nvim'] = 'https://github.com/willothy/flatten.nvim',
['gitsigns.nvim'] = 'https://github.com/lewis6991/gitsigns.nvim',
['nvim-treesitter-context'] = 'https://github.com/nvim-treesitter/nvim-treesitter-context',
} do
local install_path = vim.fn.fnamemodify('nvim_issue/' .. name, ':p')
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.opt.runtimepath:append(install_path)
end
vim.cmd([[au BufReadPost * sil! norm! g`"zv']])
vim.o.clipboard = 'unnamedplus'
require('flatten').setup {}
require('treesitter-context').setup {}
require('gitsigns').setup {} Bisected, not happened before |
@phanen Hmm, that doesn't reproduce for me. Maybe the inner Nvim (that's momentarily spawned by |
@seandewar Sorry for missing that. I just updated my reproduce. (also |
Thanks! That repro'd it for me; this seems to be a unique case. From a quick GDBing, it seems Although I don't have any time left today; I'll try to address that later. 👍 |
I'm also still having cursor issues :( |
Problem: after #32458, it may still be possible for
busy_start
UI events to be emitted without matchingbusy_stop
s in the terminal.Solution: do
terminal_enter
's cursor visibility check immediately after setting/restoring State so it occurs before events. This ensures that if pending escape sequences are processed while interminal_enter
, the cursor's initial visibility is set beforeis_focused
is checked byterm_settermprop
.As a result, we can move the call to
showmode
back to where it was originally.