-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: 8292a994b8228f1033fa3afbf60902acbf7d0721:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit 8292a994b8228f1033fa3afbf60902acbf7d0721
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Sat Apr 26 03:37:18 2008 +0000

    *** empty log message ***

diff --git a/Changes b/Changes

index 28b8571dc62e15ad9f2e62f27e852e09a4c6c38c..

index ..6b1bf94cb6a20da8962fd0c2dffeb8ed14bd0e7a 100644

--- a/Changes
+++ b/Changes
@@ -25,11 +25,15 @@ TODO: rxvt -font 10x20 -xrm "*.tabbed.font: 10x20" -pe tabbed
       how does one affect the tab windows themselves? seems not to work anymore.

 TODO: memory leak for((i=0;i<1000;++o)); do rxvtc -g 1x1 -e exit;done
+TODO: implement initial chdir for tabs by making it a resource?
+	- correctly reset the multibyte state to the initial one
+          after EILSEQ (patch by Neil Booth). This fixes the
+          issue of rxvt-unicode not properly displaying text after an illegal
+          sequence on NetBSD and probably other systems.
 	- made tabs moveable (based on a patch by Petr Machata).
         - support relative paths for RXVT_SOCKET in urxvtd.
         - better diagnostic on 0x0 window geometries.
-
-TODO: implement initial chdir for tabs by making it a resource?
+
 9.02 Tue Jan 29 11:58:36 CET 2008
 	- the "exg makes everybody happy" release.
 	- fix build with !xft.
diff --git a/src/command.C b/src/command.C

index 475fb020e9fdbab6513ae17ef59311cc1bc5a38e..

index ..f41df70cdffc5fcc4561023692d99d8cce689221 100644

--- a/src/command.C
+++ b/src/command.C
@@ -2326,7 +2326,10 @@ rxvt_term::next_char () NOTHROW
         }

       if (len == (size_t)-1)
-        return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
+        {
+          mbrtowc (0, 0, 0, mbstate); // reset now undefined conversion state
+          return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
+        }

       // assume wchar == unicode
       cmdbuf_ptr += len;
diff --git a/src/misc.C b/src/misc.C

index d589b8952e12cb88e9d6bb4f68c0090fa0916d7a..

index ..c55c54332a7d0ce2ff99f1bb4d38d35194a343a5 100644

--- a/src/misc.C
+++ b/src/misc.C
@@ -40,7 +40,10 @@ rxvt_wcstombs (const wchar_t *str, int len)
       ssize_t l = wcrtomb (dst, *str++, mbs);

       if (l < 0)
-        *dst++ = '?';
+        {
+          *dst++ = '?';
+          wcrtomb (0, 0, mbs); // reset undefined state
+        }
       else
         dst += l;
     }

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 11:27:08 2024