mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
fix(input): only disable mapped CTRL-C interrupts when getting input
(cherry picked from commit f3330023a5
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
ef43e7d1f6
commit
89260ea5d6
@@ -2184,6 +2184,10 @@ static int vgetorpeek(bool advance)
|
||||
// try re-mapping.
|
||||
for (;;) {
|
||||
check_end_reg_executing(advance);
|
||||
// os_breakcheck() can call input_enqueue()
|
||||
if ((mapped_ctrl_c | curbuf->b_mapped_ctrl_c) & get_real_state()) {
|
||||
ctrl_c_interrupts = false;
|
||||
}
|
||||
// os_breakcheck() is slow, don't use it too often when
|
||||
// inside a mapping. But call it each time for typed
|
||||
// characters.
|
||||
@@ -2192,6 +2196,7 @@ static int vgetorpeek(bool advance)
|
||||
} else {
|
||||
os_breakcheck(); // check for CTRL-C
|
||||
}
|
||||
ctrl_c_interrupts = true;
|
||||
int keylen = 0;
|
||||
if (got_int) {
|
||||
// flush all input
|
||||
|
Reference in New Issue
Block a user