mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
1d11808bfd
Upon `terminal_enter`, `mapped_ctrl_c` is set in order to avoid `CTRL-C` interrupts (which is proxied to the terminal process instead), `os_inchar` will then test `mapped_ctrl_c` against `State` and set `ctrl_c_interrupts=false` which prevents `process_ctrl_c` from setting `got_int=true` in a terminal state. However, if `got_int` is set outside of `process_ctrl_c`, e.g. via `interrupt()`, this will hang the neovim process as `terminal_execute` will enter an endless loop as `got_int` will never be cleared causing `safe_vgetc` to always return `Ctrl_C`. A minimal example reproducing this bug: ```vim :autocmd TermEnter * call timer_start(500, {-> interrupt()}) :terminal :startinsert ``` To fix, we make sure `got_int` is cleared inside `terminal_execute` when it detects `Ctrl_C`. Closes #20726 Co-authored-by: zeertzjq <zeertzjq@outlook.com> |
||
---|---|---|
.. | ||
altscreen_spec.lua | ||
api_spec.lua | ||
buffer_spec.lua | ||
channel_spec.lua | ||
clipboard_spec.lua | ||
cursor_spec.lua | ||
edit_spec.lua | ||
ex_terminal_spec.lua | ||
highlight_spec.lua | ||
mouse_spec.lua | ||
parser_spec.lua | ||
scrollback_spec.lua | ||
testutil.lua | ||
tui_spec.lua | ||
window_spec.lua | ||
window_split_tab_spec.lua |