*** empty log message ***
authorroot <root>
Wed, 18 Jan 2006 09:40:53 +0000 (09:40 +0000)
committerroot <root>
Wed, 18 Jan 2006 09:40:53 +0000 (09:40 +0000)
Changes
doc/rxvtperl.3.html
doc/rxvtperl.3.man.in
doc/rxvtperl.3.txt
src/rxvtperl.xs
src/screen.C

diff --git a/Changes b/Changes
index eebdb78e40bec0f9075bac0b3738d1355edbfab2..1446163ec8cfea0f705068777727224c663ce8de 100644 (file)
--- a/Changes
+++ b/Changes
@@ -14,7 +14,7 @@ WISH: support tex fonts
 
 9.0
 TODO: on_seelction_popup hook or so.
-TODO: echo * at bottom => borked line lengths
+TODO: distributed clipboard example
         - new script: perl/selection-pastebin
         - improved security of setuid/setgid operation, which is now
           encouraged, by moving privileged operations into a separate
index ea805bce3eb594a4c8822d7c84d093c8f6897453..d34b173067a413a464fb7da73c1d8861ffdf6c30 100644 (file)
@@ -134,33 +134,6 @@ Rot-13 the selection when activated. Used via keyboard trigger:
 <pre>
    URxvt.keysym.C-M-r: perl:selection:rot13</pre>
 </dd>
-<p></p>
-<dt><strong><a name="item_remote_2dpastebin">remote-pastebin</a></strong><br />
-</dt>
-<dd>
-Upload the selection as textfile to a remote site.
-</dd>
-<dd>
-<pre>
-   URxvt.keysym.C-M-e: perl:selection:remote-pastebin</pre>
-</dd>
-<dd>
-<p>To set the command to upload the file set this resource:</p>
-</dd>
-<dd>
-<pre>
-   URxvt.selection-pastebin-cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.</pre>
-</dd>
-<dd>
-<p>The % is the placeholder for the textfile. The name of the textfile is the hex encoded 
-md5 sum of the selection.
-After an successful upload the selection will be replaced by the following url 
-(the % is the placeholder for the filename):</p>
-</dd>
-<dd>
-<pre>
-   URxvt.selection-pastebin-url: <a href="http://www.ta-sa.org/files/txt/%">http://www.ta-sa.org/files/txt/%</a></pre>
-</dd>
 <p></p></dl>
 <dt><strong><a name="item_popup">option-popup (enabled by default)</a></strong><br />
 </dt>
@@ -276,6 +249,48 @@ Displays a very simple digital clock in the upper right corner of the
 window. Illustrates overwriting the refresh callbacks to create your own
 overlays or changes.
 </dd>
+<p></p>
+<dt><strong><a name="item_selection_2dpastebin">selection-pastebin</a></strong><br />
+</dt>
+<dd>
+This is a little rarely useful extension that Uploads the selection as
+textfile to a remote site (or does other things). (The implementation is
+not currently secure for use in a multiuser environment as it writes to
+<em>/tmp</em> directly.).
+</dd>
+<dd>
+<p>It listens to the <code>selection-pastebin:remote-pastebin</code> keyboard command,
+i.e.</p>
+</dd>
+<dd>
+<pre>
+   URxvt.keysym.C-M-e: perl:selection-pastebin:remote-pastebin</pre>
+</dd>
+<dd>
+<p>Pressing this combination runs a command with <code>%</code> replaced by the name of
+the textfile. This command can be set via a resource:</p>
+</dd>
+<dd>
+<pre>
+   URxvt.selection-pastebin.cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.</pre>
+</dd>
+<dd>
+<p>And the default is likely not useful to anybody but the few people around
+here :)</p>
+</dd>
+<dd>
+<p>The name of the textfile is the hex encoded md5 sum of the selection, so
+the same content should lead to the same filename.</p>
+</dd>
+<dd>
+<p>After a successful upload the selection will be replaced by the text given
+in the <code>selection-pastebin-url</code> resource (again, the % is the placeholder
+for the filename):</p>
+</dd>
+<dd>
+<pre>
+   URxvt.selection-pastebin.url: <a href="http://www.ta-sa.org/files/txt/%">http://www.ta-sa.org/files/txt/%</a></pre>
+</dd>
 <p></p></dl>
 <p>
 </p>
index 6eb92a0caf0a4281f48cab52c79818ad228cab67..c1612b851da44eb71961cff500a20455214c990c 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "rxvt 3"
-.TH rxvt 3 "2006-01-17" "7.1" "RXVT-UNICODE"
+.TH rxvt 3 "2006-01-18" "7.1" "RXVT-UNICODE"
 .SH "NAME"
 @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
 .SH "SYNOPSIS"
@@ -214,28 +214,6 @@ Rot\-13 the selection when activated. Used via keyboard trigger:
 .Vb 1
 \&   URxvt.keysym.C-M-r: perl:selection:rot13
 .Ve
-.IP "remote-pastebin" 4
-.IX Item "remote-pastebin"
-Upload the selection as textfile to a remote site.
-.Sp
-.Vb 1
-\&   URxvt.keysym.C-M-e: perl:selection:remote-pastebin
-.Ve
-.Sp
-To set the command to upload the file set this resource:
-.Sp
-.Vb 1
-\&   URxvt.selection-pastebin-cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.
-.Ve
-.Sp
-The % is the placeholder for the textfile. The name of the textfile is the hex encoded 
-md5 sum of the selection.
-After an successful upload the selection will be replaced by the following url 
-(the % is the placeholder for the filename):
-.Sp
-.Vb 1
-\&   URxvt.selection-pastebin-url: http://www.ta-sa.org/files/txt/%
-.Ve
 .RE
 .RS 4
 .RE
@@ -323,6 +301,40 @@ Displays a digital clock using the built-in overlay.
 Displays a very simple digital clock in the upper right corner of the
 window. Illustrates overwriting the refresh callbacks to create your own
 overlays or changes.
+.IP "selection-pastebin" 4
+.IX Item "selection-pastebin"
+This is a little rarely useful extension that Uploads the selection as
+textfile to a remote site (or does other things). (The implementation is
+not currently secure for use in a multiuser environment as it writes to
+\&\fI/tmp\fR directly.).
+.Sp
+It listens to the \f(CW\*(C`selection\-pastebin:remote\-pastebin\*(C'\fR keyboard command,
+i.e.
+.Sp
+.Vb 1
+\&   URxvt.keysym.C-M-e: perl:selection-pastebin:remote-pastebin
+.Ve
+.Sp
+Pressing this combination runs a command with \f(CW\*(C`%\*(C'\fR replaced by the name of
+the textfile. This command can be set via a resource:
+.Sp
+.Vb 1
+\&   URxvt.selection-pastebin.cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.
+.Ve
+.Sp
+And the default is likely not useful to anybody but the few people around
+here :)
+.Sp
+The name of the textfile is the hex encoded md5 sum of the selection, so
+the same content should lead to the same filename.
+.Sp
+After a successful upload the selection will be replaced by the text given
+in the \f(CW\*(C`selection\-pastebin\-url\*(C'\fR resource (again, the % is the placeholder
+for the filename):
+.Sp
+.Vb 1
+\&   URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/%
+.Ve
 .SH "API DOCUMENTATION"
 .IX Header "API DOCUMENTATION"
 .Sh "General \s-1API\s0 Considerations"
index e64f51b5aafd84c0dc8573425633fc1181ff90b8..251977d093a2304ba9f3ae17ef28fe78485dede8 100644 (file)
@@ -66,22 +66,6 @@ PREPACKAGED EXTENSIONS
 
                URxvt.keysym.C-M-r: perl:selection:rot13
 
-        remote-pastebin
-            Upload the selection as textfile to a remote site.
-
-               URxvt.keysym.C-M-e: perl:selection:remote-pastebin
-
-            To set the command to upload the file set this resource:
-
-               URxvt.selection-pastebin-cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.
-
-            The % is the placeholder for the textfile. The name of the
-            textfile is the hex encoded md5 sum of the selection. After an
-            successful upload the selection will be replaced by the
-            following url (the % is the placeholder for the filename):
-
-               URxvt.selection-pastebin-url: http://www.ta-sa.org/files/txt/%
-
     option-popup (enabled by default)
         Binds a popup menu to Ctrl-Button2 that lets you toggle (some)
         options at runtime.
@@ -160,6 +144,34 @@ PREPACKAGED EXTENSIONS
         the window. Illustrates overwriting the refresh callbacks to create
         your own overlays or changes.
 
+    selection-pastebin
+        This is a little rarely useful extension that Uploads the selection
+        as textfile to a remote site (or does other things). (The
+        implementation is not currently secure for use in a multiuser
+        environment as it writes to /tmp directly.).
+
+        It listens to the "selection-pastebin:remote-pastebin" keyboard
+        command, i.e.
+
+           URxvt.keysym.C-M-e: perl:selection-pastebin:remote-pastebin
+
+        Pressing this combination runs a command with "%" replaced by the
+        name of the textfile. This command can be set via a resource:
+
+           URxvt.selection-pastebin.cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.
+
+        And the default is likely not useful to anybody but the few people
+        around here :)
+
+        The name of the textfile is the hex encoded md5 sum of the
+        selection, so the same content should lead to the same filename.
+
+        After a successful upload the selection will be replaced by the text
+        given in the "selection-pastebin-url" resource (again, the % is the
+        placeholder for the filename):
+
+           URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/%
+
 API DOCUMENTATION
   General API Considerations
     All objects (such as terminals, time watchers etc.) are typical
index a3768a693018f3bf63bb34e0ade1c6b438f49d5d..75b840b59e962cc14494d9f54a0a88832e005db5 100644 (file)
@@ -1514,8 +1514,17 @@ rxvt_term::screen_cur (...)
 
         if (items == 3)
           {
-            rc.row = clamp (SvIV (ST (1)), THIS->top_row, THIS->nrow - 1);
-            rc.col = clamp (SvIV (ST (2)), 0, THIS->ncol - 1);
+            rc.row = SvIV (ST (1));
+            rc.col = SvIV (ST (2));
+
+            if (ix == 2 && rc.col == 0)
+              {
+                rc.row--;
+                rc.col = THIS->ncol;
+              }
+
+            clamp_it (rc.col, 0, THIS->ncol);
+            clamp_it (rc.row, THIS->top_row, THIS->nrow - 1);
 
             if (ix)
               THIS->want_refresh = 1;
index dc86668e20abf5e43f2aee906630c243a3367a96..1b626c41dfe92a8655ad199b7b2f7c0d3a74b6bb 100644 (file)
@@ -622,19 +622,19 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count)
       // scroll everything up 'count' lines
       term_start = (term_start + count) % total_rows;
 
+      // sever bottommost line
       {
-        // severe bottommost scrolled line
         line_t &l = ROW(row2 - count);
-        l.touch ();
         l.is_longer (0);
+        l.touch ();
       }
 
-      // erase newly scorlled-in lines
-      for (int i = count; i; --i )
+      // erase newly scrolled-in lines
+      for (int i = count; i--; )
         {
           // basically this is a slightly optimized scr_blank_screen_mem
           // it is worth the effort on slower machines
-          line_t &l = ROW(nrow - i);
+          line_t &l = ROW(row2 - i);
 
           scr_blank_line (l, 0, l.l, rstyle);
 
@@ -819,11 +819,11 @@ rxvt_term::scr_add_lines (const wchar_t *str, int len, int minlines)
 
       if (screen.flags & Screen_WrapNext)
         {
-          max_it (line->l, ncol);
-          line->is_longer (1);
-
           scr_do_wrap ();
           
+          line->l = ncol;
+          line->is_longer (1);
+
           row = screen.cur.row;
           line = &ROW(row);   /* _must_ refresh */
         }