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
This commit is contained in:
+6
-1
@@ -317,7 +317,12 @@ func runWrapper() {
|
|||||||
})
|
})
|
||||||
isExecuting := func() bool {
|
isExecuting := func() bool {
|
||||||
if isAltScreenActive.Load() {
|
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() {
|
if isCommandActive.Load() {
|
||||||
// for bash: no preexec/precmd hooks, so fall back to TIOCGPGRP to detect when shell returns
|
// for bash: no preexec/precmd hooks, so fall back to TIOCGPGRP to detect when shell returns
|
||||||
|
|||||||
Reference in New Issue
Block a user