From 9c00f6eb300975b695b7d329f0b0989384cc3216 Mon Sep 17 00:00:00 2001 From: VERSE Date: Wed, 12 Aug 2026 20:03:55 +0700 Subject: [PATCH] fix(wrapper): don't let fish's alt-screen probe permanently hide the overlay (#141) fixes #139 fish's own startup terminal probe was misread as a full screen app taking over, permanently suppressing suggestions --- root/wrapper.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/root/wrapper.go b/root/wrapper.go index 761a9f5..873fc2a 100644 --- a/root/wrapper.go +++ b/root/wrapper.go @@ -317,7 +317,12 @@ func runWrapper() { }) isExecuting := func() bool { if isAltScreenActive.Load() { - return true + pgrp, pgrpErr := unix.IoctlGetInt(int(ptmx.Fd()), unix.TIOCGPGRP) + if pgrpErr == nil && pgrp == shellPGID { + isAltScreenActive.Store(false) + } else { + return true + } } if isCommandActive.Load() { // for bash: no preexec/precmd hooks, so fall back to TIOCGPGRP to detect when shell returns