-- 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: 19a6bf75c746e1479e7e9a782036a19931c84830:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit 19a6bf75c746e1479e7e9a782036a19931c84830
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Sun Jan 22 11:57:06 2006 +0000

    *** empty log message ***

diff --git a/src/encoding.h b/src/encoding.h

index 959202443de2f23ef944f202b4cd51bb9fbb1500..

index ..2d1657f4d881df0e8b248d47cc3b4f7118b09c53 100644

--- a/src/encoding.h
+++ b/src/encoding.h
@@ -65,7 +65,7 @@ codeset codeset_from_name (const char *name);
 enum {
   ZERO_WIDTH_CHAR  = 0x200b,
   REPLACEMENT_CHAR = 0xfffd,
-  NOCHAR           = 0xfffe, // must be invalid in ANY codeset (!)
+  NOCHAR           = 0xffff, // must be invalid in ANY codeset (!)
 };

 struct rxvt_codeset_conv {
diff --git a/src/perl/readline b/src/perl/readline

index b73aef3aa42666a29f90d460c6fe0953fb9715cb..

index ..1ff1b852daacf87ec26e4776b45bfe8f806bf801 100644

--- a/src/perl/readline
+++ b/src/perl/readline
@@ -23,7 +23,7 @@ sub on_button_press {
       }

       my $skipped = substr $line->t, $cur, $ofs - $cur;
-      $skipped =~ s/$urxvt::NOCHAR//g;
+      $skipped =~ s/\x{ffff}//g;

       $self->tt_write ($move x length $skipped);
    }
diff --git a/src/perl/selection b/src/perl/selection

index fc4d2e38af78d641c7a729d53187f230cb12dc31..

index ..df943f00c88eb3f09fc38ae7ada07be946da2874 100644

--- a/src/perl/selection
+++ b/src/perl/selection
@@ -112,7 +112,7 @@ sub on_sel_extend {

       # convert back from UTF-8 offset space to character space
       {
-         my $length = substr $text, $ofs, $len;
+         my $length = substr "$text ", $ofs, $len;
          utf8::decode $length;
          $len = length $length;
       }
diff --git a/src/rxvt.C b/src/rxvt.C

index 9d4b829ab87211d4813c24b06a93a469f4881081..

index ..4eddc573f394c53f8d0f386c3bfd6878e834212f 100644

--- a/src/rxvt.C
+++ b/src/rxvt.C
@@ -32,12 +32,16 @@ try
   {
     rxvt_init ();

+#if ENABLE_PERL
     stringvec *envv = new stringvec;

     for (char **var = environ; *var; var++)
       envv->push_back (strdup (*var));

     envv->push_back (0);
+#else
+    stringvec *envv = 0;
+#endif

     rxvt_term *t = new rxvt_term;

diff --git a/src/rxvt.h b/src/rxvt.h

index a9496d51468589ccd9a7e20911ee545eaea23ed1..

index ..4be268a001d1114ac874d3840860a18db69ea432 100644

--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -171,13 +171,21 @@ extern char **rxvt_environ; // the original environ pointer

 inline void set_environ (stringvec *envv)
 {
+#if ENABLE_PERL
+  assert (envv);
+#else
   if (envv)
+#endif
     environ = (char **)envv->begin ();
 }

 inline void set_environ (char **envv)
 {
+#if ENABLE_PERL
+  assert (envv);
+#else
   if (envv)
+#endif
     environ = envv;
 }

diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs

index 6a3249353de29432abd284df6c96aef980a12e99..

index ..fdb5e512bbe066e4d127b75c25c67e9b79316da4 100644

--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -1533,10 +1533,20 @@ rxvt_term::screen_cur (...)
             rc.row = SvIV (ST (1));
             rc.col = SvIV (ST (2));

-            if (ix == 2 && rc.col == 0)
+            if (ix == 2)
               {
-                rc.row--;
-                rc.col = THIS->ncol;
+                if (rc.col == 0)
+                  {
+                    // col == 0 means end of previous line
+                    rc.row--;
+                    rc.col = THIS->ncol;
+                  }
+                else if (IN_RANGE_EXC (rc.row, THIS->top_row, THIS->nrow)
+                         && rc.col > ROW(rc.row).l)
+                  {
+                    // col >= length means while line and add newline
+                    rc.col = THIS->ncol;
+                  }
               }

             clamp_it (rc.col, 0, THIS->ncol);
diff --git a/src/urxvt.pm b/src/urxvt.pm

index 98356b1f8323a9466f6ecafa4ccf957fb361cf2b..

index ..b285638be0c9f92e020fa6ef817f6b2ff1324766 100644

--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -563,7 +563,7 @@ our $RESNAME;
 our $RESCLASS;
 our $RXVTNAME;

-our $NOCHAR = chr 0xfffe;
+our $NOCHAR = chr 0xffff;

 =head2 Variables in the C<urxvt> Package

@@ -720,6 +720,8 @@ BEGIN {
    };
 }

+no warnings 'utf8';
+
 my $verbosity = $ENV{URXVT_PERL_VERBOSITY};

 sub verbose {
@@ -745,7 +747,7 @@ sub extension_package($) {
          or die "$path: $!";

       my $source =
-         "package $pkg; use strict; use utf8;\n"
+         "package $pkg; use strict; use utf8; no warnings 'utf8';\n"
          . "#line 1 \"$path\"\n{\n"
          . (do { local $/; <$fh> })
          . "\n};\n1";
@@ -1418,8 +1420,8 @@ line, starting at column C<$start_col> (default C<0>), which is useful
 to replace only parts of a line. The font index in the rendition will
 automatically be updated.

-C<$text> is in a special encoding: tabs and wide characters that use
-more than one cell when displayed are padded with C<$urxvt::NOCHAR>
+C<$text> is in a special encoding: tabs and wide characters that use more
+than one cell when displayed are padded with C<$urxvt::NOCHAR> (chr 65535)
 characters. Characters with combining characters and other characters that
 do not fit into the normal tetx encoding will be replaced with characters
 in the private use area.

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

-- Response ended

-- Page fetched on Sun Jun 2 13:58:16 2024