From 53fdabf30b417eeb7f05e9fa9cc65004cdc4da57 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 2 Jan 2006 22:23:26 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 6 +++++- src/init.C | 2 +- src/rxvtperl.xs | 22 +++++++++++++++++++++ src/urxvt.pm | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 77 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 24bb867f..77803385 100644 --- a/Changes +++ b/Changes @@ -10,9 +10,13 @@ WISH: just for fun, do shade and tint with XRender. - optionally embed a perl interpreter, which can be used for more intelligent/customized selection support, visual feedback, - menus, tabs etc. See the urxvtperl manpage. + menus, tabs etc. See the the urxvtperl manpage, the -pe option, + perl*-resources and keysym resources. - fix directory permissions on install. - improved sched_yield support. + - meta8 support was forcefully enabled in most configurations, + restored configurability of this (useless) feature (reported + by Mikachu) 6.2 Mon Jan 2 16:03:01 CET 2006 - implemented intensityStyles option which enables/disables bold/blink diff --git a/src/init.C b/src/init.C index 4d757577..5b7c1463 100644 --- a/src/init.C +++ b/src/init.C @@ -650,7 +650,7 @@ rxvt_term::init_command (const char *const *argv) */ #ifdef META8_OPTION - meta_char = OPTION ((Opt_meta8) ? 0x80 : C0_ESC); + meta_char = OPTION (Opt_meta8) ? 0x80 : C0_ESC; #endif get_ourmods (); diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 92aaebcd..49a3791d 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -392,6 +392,28 @@ rxvt_term::locale_decode (SV *octets) OUTPUT: RETVAL +int +rxvt_term::nsaved () + CODE: + RETVAL = THIS->nsaved; + OUTPUT: + RETVAL + +int +rxvt_term::view_start (int newval = -1) + CODE: +{ + RETVAL = THIS->view_start; + + if (newval >= 0) + { + THIS->view_start = min (newval, THIS->nsaved); + THIS->scr_changeview (RETVAL); + } +} + OUTPUT: + RETVAL + void rxvt_term::_resource (char *name, int index, SV *newval = 0) PPCODE: diff --git a/src/urxvt.pm b/src/urxvt.pm index a66212b5..224fb52d 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -392,8 +392,55 @@ Convert the given locale-encoded octets into a perl string. =item $term->tt_write ($octets) Write the octets given in C<$data> to the tty (i.e. as program input). To -pass characters instead of octets, you should convetr you strings first to -the locale-specific encoding using C<< $term->locale_encode >>. +pass characters instead of octets, you should convert your strings first +to the locale-specific encoding using C<< $term->locale_encode >>. + +=item $nsaved = $term->nsaved + +Returns the number of lines in the scrollback buffer. + +=item $view_start = $term->view_start ([$newvalue]) + +Returns the negative row number of the topmost line. Minimum value is +C<0>, which displays the normal terminal contents. Larger values scroll +this many lines into the scrollback buffer. + +=item $text = $term->ROW_t ($row_number[, $new_text]) + +Returns the text of the entire row with number C<$row_number>. Row C<0> +is the topmost terminal line, row C<< $term->$ncol-1 >> is the bottommost +terminal line. The scrollback buffer starts at line C<-1> and extends to +line C<< -$term->nsaved >>. + +If C<$new_text> is specified, it will completely replace the current line. + +C<$text> is in a special encoding: tabs and wide characters that use more +than one cell when displayed are padded with urxvt::NOCHAR characters +(C). 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. + +You have to obey this encoding when changing text. The advantage is +that C and similar functions work on screen cells and not on +characters. + +The methods C<< $term->special_encode >> and C<< $term->special_decode >> +can be used to convert normal strings into this encoding and vice versa. + +=item $rend = $term->ROW_r ($row_number[, $new_rend]) + +Like C<< $term->ROW_t >> + +=item $text = $term->special_encode $string + +Converts a perl string into the special encoding used by rxvt-unicode, +where one character corresponds to one screen cell. See +C<< $term->ROW_t >> for details. + +=item $string = $term->special_decode $text + +Converts rxvt-unicodes text reprsentation into a perl string. See +C<< $term->ROW_t >> for details. =back -- 2.34.1