Terminal: apply ESC delay; stop treating resize as C-g
set_escdelay is an ncurses function, not a macro, so the #ifdef guard compiled it out and ESC waited the 1 s default. KEY_RESIZE was mapped to Refresh, the C-g cancel handler, which cleared the mark and cancelled open prompts (including swap recovery) on every resize. Audit findings B1, B2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015rcVQiiWyTzoNrsvLSaAfB
This commit is contained in:
@@ -165,9 +165,10 @@ map_key_to_command(const int ch,
|
||||
out = {true, CommandId::DeleteChar, "", 0};
|
||||
return true;
|
||||
case KEY_RESIZE:
|
||||
k_prefix = false;
|
||||
k_ctrl_pending = false;
|
||||
out = {true, CommandId::Refresh, "", 0};
|
||||
// TerminalFrontend::Step picks up the new size before the next draw.
|
||||
// Refresh is the C-g cancel handler, so issuing it here would clear the
|
||||
// mark and cancel open prompts on every window resize.
|
||||
out.hasCommand = false;
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user