*** empty log message ***
authorroot <root>
Sun, 22 Jan 2006 11:57:06 +0000 (11:57 +0000)
committerroot <root>
Sun, 22 Jan 2006 11:57:06 +0000 (11:57 +0000)
src/encoding.h
src/perl/readline
src/perl/selection
src/rxvt.C
src/rxvt.h
src/rxvtperl.xs
src/urxvt.pm

index 9592024..2d1657f 100644 (file)
@@ -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 {
index b73aef3..1ff1b85 100644 (file)
@@ -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);
    }
index fc4d2e3..df943f0 100644 (file)
@@ -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;
       }
index 9d4b829..4eddc57 100644 (file)
@@ -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;
 
index a9496d5..4be268a 100644 (file)
@@ -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;
 }
 
index 6a32493..fdb5e51 100644 (file)
@@ -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);
index 98356b1..b285638 100644 (file)
@@ -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.