-- 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:
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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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