From 5bac5327b33f0e6a3ee065cbec58ebb452f38e2b Mon Sep 17 00:00:00 2001 From: root Date: Sat, 26 Dec 2009 09:42:16 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 8 ++++---- src/perl/selection | 1 + src/rxvtperl.xs | 21 ++++++++++++++++----- src/urxvt.pm | 11 +++++++++-- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/Changes b/Changes index af14b5c7..f98c7bc8 100644 --- a/Changes +++ b/Changes @@ -19,11 +19,8 @@ WISH: load system-wide config file even if we don't have one WISH: look into XAddConnectionWatch, does anybody need that? DUMB: support tex fonts -TODO: `/etc/udev/rules.d/41-mythtv-permissions.rules' TODO: exg-- patch TODO: selection_beg/end should set screen, or so -TODO: - upgrade to libev-xx -TODO: -rv interacts badly with popups. TODO: perl-shell-window? TODO: zweimal numlock? falsche codes rxvt urxvt for numpad? - port to glibc-2.10 changes (strchr etc. returning const char * @@ -60,6 +57,9 @@ TODO: zweimal numlock? falsche codes rxvt urxvt for numpad? though neither of them does it, and then calls the rest of the world in need of fixing. go figure. - on_keyboard_command is on_user_command (patch by Michael Witten). + - setting the selection from perl will now reset the selection screen + to the current screen. the srceen can be manipulated using + the new ->selection_screen method. 9.06 Sat Nov 8 17:47:18 CET 2008 - NOTICE: this release updates terminfo/termcap. @@ -112,7 +112,7 @@ TODO: zweimal numlock? falsche codes rxvt urxvt for numpad? - tabbed extension now starts in the "correct" working directory. - work around fedora 9 providing isastream but not the relevant header file for it (report by Tuncer Ayaz). - - upgrade libev, fixing a bug in the select backend + - upgrade libev, fixing a bug in the select backend. with more than 31 file descriptors on non-linux 64 bit systems. - correctly reset the multibyte state to the initial one after EILSEQ (patch by Neil Booth). This fixes the diff --git a/src/perl/selection b/src/perl/selection index 33b68295..ff271a30 100644 --- a/src/perl/selection +++ b/src/perl/selection @@ -41,6 +41,7 @@ my @mark_patterns = ( qr{ (?= 3) { rc.row = SvIV (ST (1)); rc.col = SvIV (ST (2)); @@ -1578,17 +1578,21 @@ rxvt_term::screen_cur (...) if (ix) { + THIS->selection.screen = THIS->current_screen; + THIS->want_refresh = 1; THIS->refresh_check (); } } } -char -rxvt_term::cur_charset () +int +rxvt_term::selection_screen (int screen = -1) CODE: - RETVAL = THIS->charsets [THIS->screen.charset]; - OUTPUT: + RETVAL = THIS->selection.screen; + if (screen >= 0) + THIS->selection.screen = screen; + OUTPUT: RETVAL void @@ -1622,6 +1626,13 @@ rxvt_term::selection (SV *newtext = 0) } } +char +rxvt_term::cur_charset () + CODE: + RETVAL = THIS->charsets [THIS->screen.charset]; + OUTPUT: + RETVAL + void rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle1 = RS_RVid, U32 rstyle2 = RS_RVid | RS_Uline) diff --git a/src/urxvt.pm b/src/urxvt.pm index 8d73d6f7..02e773c5 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -1374,8 +1374,15 @@ set it (which is usually bad as applications don't expect that). =item ($row, $col) = $term->selection_end ([$row, $col]) -Return the current values of the selection mark, begin or end positions, -and optionally set them to new values. +Return the current values of the selection mark, begin or end positions. + +When arguments are given, then the selection coordinates are set to +C<$row> and C<$col>, and the selection screen is set to the current +screen. + +=item $screen = $term->selection_screen ([$screen]) + +Returns the current selection screen, and then optionally sets it. =item $term->selection_make ($eventtime[, $rectangular]) -- 2.34.1