This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch tymux
in repository terminology.
View the commit online.
commit 4f43f4b5759b4267d502c56403b615e02ab5a816
Author: [email protected] <[email protected]>
AuthorDate: Mon May 4 21:49:37 2026 -0600
feat(tymux): respawn shell in-place when native tymux session ends
When a user's native tymux session exits (via explicit exit, daemon
failure, network loss, etc.), the PTY callback now detects the tymux
mode and demotes gracefully: the tab survives, the textgrid and mouse
hooks are preserved, and a fresh local shell respawns rooted at the
inner session's last reported cwd. This replaces the existing behavior
of tearing down the tab on PTY exit. Plain PTY exits flow through
unchanged. The forward-declaration of _termio_tymux_demote was
relocated earlier in the file (before _smart_pty_exited) to establish
proper ordering. This resolves the -Wunused-function warning from the
previous commit and completes the auto-respawn half of the feature;
the Ctrl+b d detach trigger (arriving next) will reuse the same
socket-EOF plumbing path.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---
src/bin/termio.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/bin/termio.c b/src/bin/termio.c
index c84799df..337d26f3 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -3738,6 +3738,8 @@ _smart_pty_cancel_sel(void *data)
}
}
+static void _termio_tymux_demote(Evas_Object *obj, Termio *sd, const char *cwd);
+
static void
_smart_pty_exited(void *data)
{
@@ -3745,6 +3747,13 @@ _smart_pty_exited(void *data)
EINA_SAFETY_ON_NULL_RETURN(sd);
+ if (sd->tymux)
+ {
+ const char *cwd = sd->tymux->last_cwd;
+ _termio_tymux_demote(data, sd, cwd);
+ return;
+ }
+
if (sd->event)
{
evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_DOWN,
@@ -3875,7 +3884,6 @@ _smart_tymux_resume(void *data)
/* Forward declarations — defined below after _termio_tymux_newtab_job. */
static void _termio_tymux_switch_job(void *data);
-static void _termio_tymux_demote(Evas_Object *obj, Termio *sd, const char *cwd);
static void _smart_pty_command(void *data);
/* Deferred new-tab creation: opens a new tab, then schedules a tymux switch
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.