This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/36/head
in repository terminology.

View the commit online.

commit 62e71f4e1bd113b0dd7582bfe5d56667581ab2f9
Author: [email protected] <[email protected]>
AuthorDate: Wed Mar 18 21:30:10 2026 -0600

    fix: read active screen buffer in _flush_screen_to_shm
    
    The function was incorrectly checking ty->altbuf to select which
    buffer to read. However, termpty_screen_swap() already swaps the
    screen/screen2 pointers themselves, so ty->screen is always the
    currently-active display buffer regardless of altbuf state. The
    altbuf branch was reading the stale primary buffer instead of the
    active alternate buffer, causing fullscreen applications (htop, vim,
    less, etc.) to appear blank in session mode.
    
    Fixes blank content in fullscreen apps when using tymux sessions.
---
 src/bin/tymux_session.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/bin/tymux_session.c b/src/bin/tymux_session.c
index 873a59e9..82c8b57b 100644
--- a/src/bin/tymux_session.c
+++ b/src/bin/tymux_session.c
@@ -93,17 +93,15 @@ _flush_screen_to_shm(TermDSession *sess)
    Termcell      *scr;
    int            circ_off;
 
-   /* Select primary or alternate screen buffer */
-   if (ty->altbuf)
-     {
-        scr      = ty->screen2;
-        circ_off = ty->circular_offset2;
-     }
-   else
-     {
-        scr      = ty->screen;
-        circ_off = ty->circular_offset;
-     }
+   /* Always read from ty->screen / ty->circular_offset.
+    * termpty_screen_swap() swaps the screen pointers themselves, so
+    * ty->screen is always the currently-active buffer regardless of
+    * whether the alternate screen is in use (ty->altbuf).  Reading
+    * ty->screen2 when altbuf==1 would return the stale primary
+    * buffer, causing fullscreen apps (htop, vim, less …) to appear
+    * blank in session mode. */
+   scr      = ty->screen;
+   circ_off = ty->circular_offset;
 
    /* Clamp to shm capacity */
    cols = (w < (int)TERMSRV_MAX_COLS) ? w : (int)TERMSRV_MAX_COLS;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to