diff options
| author | Gregory Anders <greg@gpanders.com> | 2025-04-22 07:18:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-22 05:18:34 -0700 |
| commit | 82f08f33c1017408940d5d03c19555364a8029d5 (patch) | |
| tree | 7d9e513321a7a33186dee98be2275da5e33af579 /test/functional/vimscript/api_functions_spec.lua | |
| parent | d3e495ce03e3389c2c28ffcfe2e41c088a37f1ef (diff) | |
| download | rneovim-82f08f33c1017408940d5d03c19555364a8029d5.tar.gz rneovim-82f08f33c1017408940d5d03c19555364a8029d5.tar.bz2 rneovim-82f08f33c1017408940d5d03c19555364a8029d5.zip | |
fix(tui): ensure all pending escape sequences are processed before exiting #32151
Problem:
Neovim disables a number of terminal modes when it exits, some of which
cause the terminal to send asynchronous events to Neovim. It's possible
that Neovim exits before the terminal has received and processed all of
the sequences to disable these modes, causing the terminal to emit one
of these asynchronous sequences after Neovim has already exited. If this
happens, then the sequence is received by the user's shell (or some
other program that is not Neovim).
Solution:
When Neovim exits, it now emits a Device Attributes request (DA1)
after disabling all of the different modes. When the terminal responds
to this request we know that it has already received all of our other
sequences disabling the other modes. At that point, it should not be
emitting any further asynchronous sequences. This means the process of
exiting Neovim is now asynchronous as well since it depends on receiving
the DA1 response from the terminal.
Diffstat (limited to 'test/functional/vimscript/api_functions_spec.lua')
0 files changed, 0 insertions, 0 deletions