File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import {
3030 exitOverlayAnswerMode ,
3131 handleOverlayAnswerKey ,
3232 notifyOverlayClosed ,
33+ stopDecisionGate ,
3334} from "./overlay-host.js" ;
3435import {
3536 applyFocus ,
@@ -413,9 +414,7 @@ export function createShellKeyHandlers(
413414 // way Esc does, then interrupts the turn, which drops queued gates too.
414415 if ( key . ctrl && key . name === "c" && isDecisionGate ( shell ) ) {
415416 key . preventDefault ( ) ;
416- abortOverlayHostReservations ( shell ) ;
417- closeInsetOverlay ( shell ) ;
418- interruptShell ( shell ) ;
417+ stopDecisionGate ( shell ) ;
419418 return ;
420419 }
421420 // Checked before the filter handlers: an opener pressed again closes,
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 ) ;
@@ -639,6 +640,13 @@ export function abortOverlayHostReservations(shell: AppShell): void {
639640 scheduleDeferredCommandFlush ( shell ) ;
640641}
641642
643+ /** Reject a decision gate and stop the turn, matching its Ctrl+C behavior. */
644+ export function stopDecisionGate ( shell : AppShell ) : void {
645+ abortOverlayHostReservations ( shell ) ;
646+ closeInsetOverlay ( shell ) ;
647+ interruptShell ( shell ) ;
648+ }
649+
642650/** One deferred command-surface slot while the host is busy. */
643651function deferBusyCommandOpen (
644652 shell : AppShell ,
You can’t perform that action at this time.
0 commit comments