repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: e634824b9872015ebb55419fee729a1219adb7ec:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit e634824b9872015ebb55419fee729a1219adb7ec
Author: Marc Lehmann 
Date:   Sat Dec 26 09:42:16 2009 +0000

    *** empty log message ***

diff --git a/Changes b/Changes
index af14b5c779253ac0bad77db8ef738d8f0aa670d1..
index ..f98c7bc8c564852ec7c62dfd4e9d29306f5c5954 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 33b682952104748d98ddfb121f4e743d0ad8d93a..
index ..ff271a30074b3ca6bf4957207a89c756a2fc0898 100644
--- a/src/perl/selection
+++ b/src/perl/selection
@@ -41,6 +41,7 @@ my @mark_patterns = (
    qr{ (?
index 924981fbb9dd9db6964b7aa71fd19da8d24fad34..
index ..af2dfd9f0d6d84ac0872eece8c55b956ef14579c 100644
--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -1552,7 +1552,7 @@ rxvt_term::screen_cur (...)
             PUSHs (sv_2mortal (newSViv (rc.col)));
           }

-        if (items == 3)
+        if (items >= 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 8d73d6f772a1b81e266cb167efc1f225227b1cee..
index ..02e773c5f8a1cd4e30f70c4272aa9efa53b9381e 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])

-----END OF PAGE-----