aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/extmark_spec.lua
diff options
context:
space:
mode:
authoribhagwan <59988195+ibhagwan@users.noreply.github.com>2024-08-19 15:23:56 -0700
committerGitHub <noreply@github.com>2024-08-20 06:23:56 +0800
commit1d11808bfd2879bf278cd05a7095a6634fa5afec (patch)
treef8a2f1b58cf9d4a372811b6f185f985ce2e23318 /test/functional/api/extmark_spec.lua
parent169f37b94f5227fd3bb98aef3e1f592ab22f96b7 (diff)
downloadrneovim-1d11808bfd2879bf278cd05a7095a6634fa5afec.tar.gz
rneovim-1d11808bfd2879bf278cd05a7095a6634fa5afec.tar.bz2
rneovim-1d11808bfd2879bf278cd05a7095a6634fa5afec.zip
fix(terminal): interrupt/got_int hangs terminal (#30056)
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>
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
0 files changed, 0 insertions, 0 deletions