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

git pushed a commit to branch master
in repository terminology.

View the commit online.

commit 6c03b19abbf19e48577134d7f22d94ea0b1318ed
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Aug 3 13:26:08 2026 -0600

    termptyesc: keep last_char across an incomplete escape sequence
    
    termpty_handle_seq() returns zero to mean "not complete, nothing consumed,
    call me again once more bytes arrive". Its epilogue assigned ty->last_char
    unconditionally, so that non-answer still cleared the last printable
    character.
    
    REP (CSI b) repeats that character. If the ESC introducing it landed at the
    end of one read and the rest arrived in the next -- a matter of timing, not
    of what the program printed -- REP found nothing to repeat and silently
    produced no output. tests/rep.sh loses twenty lines that way.
    
    Only record last_char when something was actually consumed.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
---
 src/bin/termptyesc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 2eb26efb..92a2a2a6 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -5337,6 +5337,9 @@ end:
      }
 #endif
    ty->decoding_error = EINA_FALSE;
-   ty->last_char = last_char;
+   /* A zero return means incomplete: nothing was consumed, so leave last_char
+    * alone or a REP whose escape straddles a read boundary finds nothing. */
+   if (len > 0)
+     ty->last_char = last_char;
    return len;
 }

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

Reply via email to