fix: stop consuming repeated Escape keys after command palette dismissal

The `shouldConsumeSuppressedEscape` function had an early return that
unconditionally consumed all repeated Escape key events (`isARepeat`),
regardless of whether the suppression window had expired. This caused
Escape presses to be swallowed in TUI apps (e.g. lazygit) running in
panels, because the repeat events never reached the active responder.

Removing the `isARepeat` guard lets repeated Escapes fall through to
the existing time-based check (0.35s window), which correctly expires
and stops consuming events after the command palette is dismissed.

Fixes #1610

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
CHE-3 2026-03-22 19:38:38 -04:00
parent 76c1e632f0
commit 5de59cd4ed

View file

@ -4452,9 +4452,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
commandPaletteEscapeSuppressionByWindowId.contains(windowId) else {
return false
}
if event.isARepeat {
return true
}
let startedAt = commandPaletteEscapeSuppressionStartedAtByWindowId[windowId] ?? 0
if ProcessInfo.processInfo.systemUptime - startedAt <= 0.35 {
return true