mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
vim-patch:8.1.0069: cannot handle pressing CTRL-C in a prompt buffer
Problem: Cannot handle pressing CTRL-C in a prompt buffer.
Solution: Add prompt_setinterrupt().
0e5979a6d4
This commit is contained in:
@@ -823,6 +823,16 @@ static int insert_handle_key(InsertState *s)
|
||||
s->nomove = true;
|
||||
return 0; // exit insert mode
|
||||
}
|
||||
if (s->c == Ctrl_C && bt_prompt(curbuf)) {
|
||||
if (invoke_prompt_interrupt()) {
|
||||
if (!bt_prompt(curbuf)) {
|
||||
// buffer changed to a non-prompt buffer, get out of
|
||||
// Insert mode
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// when 'insertmode' set, and not halfway through a mapping, don't leave
|
||||
// Insert mode
|
||||
|
Reference in New Issue
Block a user