File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727 exitOverlayAnswerMode ,
2828 handleOverlayAnswerKey ,
2929 notifyOverlayClosed ,
30+ stopDecisionGate ,
3031} from "./overlay-host.js" ;
3132import {
3233 applyFocus ,
@@ -356,9 +357,7 @@ export function createShellKeyHandlers(
356357 // way Esc does, then interrupts the turn, which drops queued gates too.
357358 if ( key . ctrl && key . name === "c" && isDecisionGate ( shell ) ) {
358359 key . preventDefault ( ) ;
359- abortOverlayHostReservations ( shell ) ;
360- closeInsetOverlay ( shell ) ;
361- interruptShell ( shell ) ;
360+ stopDecisionGate ( shell ) ;
362361 return ;
363362 }
364363 // Checked ahead of the filter handlers: an opener chord pressed again is
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ import {
5151 relayout ,
5252 setStatusFlash ,
5353} from "./chrome.js" ;
54+ import { interruptShell } from "./prompt.js" ;
5455
5556function refreshOverlayTitle ( shell : AppShell ) : void {
5657 const bag = shellInternals ( shell ) ;
@@ -682,6 +683,13 @@ export function abortOverlayHostReservations(shell: AppShell): void {
682683 scheduleDeferredCommandFlush ( shell ) ;
683684}
684685
686+ /** Reject a decision gate and stop the turn, matching its Ctrl+C behavior. */
687+ export function stopDecisionGate ( shell : AppShell ) : void {
688+ abortOverlayHostReservations ( shell ) ;
689+ closeInsetOverlay ( shell ) ;
690+ interruptShell ( shell ) ;
691+ }
692+
685693/** One deferred command-surface slot while the host is busy. */
686694function deferBusyCommandOpen (
687695 shell : AppShell ,
You can’t perform that action at this time.
0 commit comments