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 {
}
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);
}
# 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;
}
{
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;
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;
}
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);
our $RESCLASS;
our $RXVTNAME;
-our $NOCHAR = chr 0xfffe;
+our $NOCHAR = chr 0xffff;
=head2 Variables in the C<urxvt> Package
};
}
+no warnings 'utf8';
+
my $verbosity = $ENV{URXVT_PERL_VERBOSITY};
sub verbose {
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";
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.