*** empty log message ***
authorroot <root>
Fri, 20 Jan 2006 22:49:33 +0000 (22:49 +0000)
committerroot <root>
Fri, 20 Jan 2006 22:49:33 +0000 (22:49 +0000)
13 files changed:
Changes
MANIFEST
doc/rxvt.1.html
doc/rxvt.1.man.in
doc/rxvt.1.txt
doc/rxvtperl.3.html
doc/rxvtperl.3.man.in
doc/rxvtperl.3.txt
src/encoding.h
src/perl/readline
src/rxvt.h
src/rxvtperl.xs
src/urxvt.pm

diff --git a/Changes b/Changes
index d68f0c6..355e9f5 100644 (file)
--- a/Changes
+++ b/Changes
@@ -19,6 +19,8 @@ WISH: support tex fonts
 7.2
        - removed support for obsolete offix dnd protocol.
         - added "tabbed" extension that provides a crude tabbed terminal.
+        - added "readline" extension that allows cursor positioning
+          via mouse clicks.
         - fixed the automove-background extension to ignore coordinates
           in non-synthetic events.
 
index ad41eb3..db761e9 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -164,6 +164,7 @@ src/perl/searchable-scrollback
 src/perl/automove-background
 src/perl/mark-urls
 src/perl/tabbed
+src/perl/readline
 src/perl/example-refresh-hooks
 src/perl/block-graphics-to-ascii
 src/perl/digital-clock
index 23846d0..b486059 100644 (file)
@@ -1585,9 +1585,10 @@ the selection.</p>
 <dt><strong><a name="item_insertion_3a"><strong>Insertion</strong>:</a></strong><br />
 </dt>
 <dd>
-Pressing and releasing the Middle mouse button (or <strong>Shift-Insert</strong>) in
-an <strong>rxvt</strong> window causes the current text selection to be
-inserted as if it had been typed on the keyboard.
+Pressing and releasing the Middle mouse button in an <strong>rxvt</strong> window
+causes the value of the PRIMARY selection (Shift for CLIPBOARD) to be inserted
+as if it had been typed on the keyboard.
+<strong>Shift-Insert</strong> causes the value of the PRIMARY selection to be inserted too.
 </dd>
 <p></p></dl>
 <p>
index eaac805..daa15b2 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -1201,9 +1201,10 @@ selection, and trailing whitespace is visually underlined and removed from
 the selection.
 .IP "\fBInsertion\fR:" 4
 .IX Item "Insertion:"
-Pressing and releasing the Middle mouse button (or \fBShift-Insert\fR) in
-an \fB@@RXVT_NAME@@\fR window causes the current text selection to be
-inserted as if it had been typed on the keyboard.
+Pressing and releasing the Middle mouse button in an \fB@@RXVT_NAME@@\fR window
+causes the value of the \s-1PRIMARY\s0 selection (Shift for \s-1CLIPBOARD\s0) to be inserted
+as if it had been typed on the keyboard.
+\&\fBShift-Insert\fR causes the value of the \s-1PRIMARY\s0 selection to be inserted too.
 .SH "CHANGING FONTS"
 .IX Header "CHANGING FONTS"
 Changing fonts (or font sizes, respectively) via the keypad is not yet
index 1142ee7..5a71cdf 100644 (file)
@@ -1036,9 +1036,10 @@ TEXT SELECTION AND INSERTION
         removed from the selection.
 
     Insertion:
-        Pressing and releasing the Middle mouse button (or Shift-Insert) in
-        an rxvt window causes the current text selection to be inserted as
-        if it had been typed on the keyboard.
+        Pressing and releasing the Middle mouse button in an rxvt window
+        causes the value of the PRIMARY selection (Shift for CLIPBOARD) to
+        be inserted as if it had been typed on the keyboard. Shift-Insert
+        causes the value of the PRIMARY selection to be inserted too.
 
 CHANGING FONTS
     Changing fonts (or font sizes, respectively) via the keypad is not yet
index 4381c11..c49caa7 100644 (file)
@@ -152,7 +152,7 @@ runtime.
 <dd>
 Binds a popup menu to Ctrl-Button3 that lets you convert the selection
 text into various other formats/action (such as uri unescaping, perl
-evalution, web-browser starting etc.), depending on content.
+evaluation, web-browser starting etc.), depending on content.
 </dd>
 <dd>
 <p>Other extensions can extend this popup menu by pushing a code reference
@@ -248,6 +248,23 @@ every error message as a selection pattern, and the second line transforms
 the message into vi commands to load the file.</p>
 </dd>
 <p></p>
+<dt><strong><a name="item_readline">readline</a></strong><br />
+</dt>
+<dd>
+A support package that tries to make editing with readline easier. At the
+moment, it reacts to clicking with the left mouse button by trying to
+move the text cursor to this position. It does so by generating as many
+cursor-left or cursor-right keypresses as required (the this only works
+for programs that correctly support wide characters).
+</dd>
+<dd>
+<p>It only works when clicking into the same line (possibly extended over
+multiple rows) as the text cursor and on the primary screen, to reduce the
+risk of misinterpreting. The normal selection isn't disabled, so quick
+successive clicks might interfere with selection creation in harmless
+ways.</p>
+</dd>
+<p></p>
 <dt><strong><a name="item_tabbed">tabbed</a></strong><br />
 </dt>
 <dd>
@@ -257,8 +274,9 @@ displays a ``[NEW]'' button, which, when clicked, will add a new tab, followed b
 button per tab.
 </dd>
 <dd>
-<p>Clicking a button will activate that tab. Pressing Shift-Left and
-Shift-Right will switch to the tab left or right of the current one.</p>
+<p>Clicking a button will activate that tab. Pressing <strong>Shift-Left</strong> and
+<strong>Shift-Right</strong> will switch to the tab left or right of the current one,
+while <strong>Shift-Down</strong> creates a new tab.</p>
 </dd>
 <p></p>
 <dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br />
@@ -636,6 +654,8 @@ focus out processing.
 <p></p>
 <dt><strong><a name="item_on_configure_notify__24term_2c__24event">on_configure_notify $term, $event</a></strong><br />
 </dt>
+<dt><strong><a name="item_on_property_notify__24term_2c__24event">on_property_notify $term, $event</a></strong><br />
+</dt>
 <dt><strong><a name="item_on_key_press__24term_2c__24event_2c__24keysym_2c__">on_key_press $term, $event, $keysym, $octets</a></strong><br />
 </dt>
 <dt><strong><a name="item_on_key_release__24term_2c__24event_2c__24keysym">on_key_release $term, $event, $keysym</a></strong><br />
@@ -656,8 +676,8 @@ the hook returns true, then the even will be ignored by rxvt-unicode.
 </dd>
 <dd>
 <p>The event is a hash with most values as named by Xlib (see the XEvent
-manpage), with the additional members <code>row</code> and <code>col</code>, which are the row
-and column under the mouse cursor.</p>
+manpage), with the additional members <code>row</code> and <code>col</code>, which are the
+(real, not screen-based) row and column under the mouse cursor.</p>
 </dd>
 <dd>
 <p><code>on_key_press</code> additionally receives the string rxvt-unicode would
@@ -1143,6 +1163,12 @@ confused by changes in cursor position or scrolling. Its useful inside a
 <code>on_add_lines</code> hook, though.</p>
 </dd>
 <p></p>
+<dt><strong><a name="item_scr_change_screen">$term-&gt;scr_change_screen ($screen)</a></strong><br />
+</dt>
+<dd>
+Switch to given screen - 0 primary, 1 secondary.
+</dd>
+<p></p>
 <dt><strong><a name="item_cmd_parse">$term-&gt;cmd_parse ($octets)</a></strong><br />
 </dt>
 <dd>
@@ -1249,6 +1275,12 @@ Return the modifier masks corresponding to the ``ISO Level 3 Shift'' (often
 AltGr), the meta key (often Alt) and the num lock key, if applicable.
 </dd>
 <p></p>
+<dt><strong><a name="item_current_screen">$screen = $term-&gt;current_screen</a></strong><br />
+</dt>
+<dd>
+Returns the currently displayed screen (0 primary, 1 secondary).
+</dd>
+<p></p>
 <dt><strong><a name="item_view_start">$view_start = $term-&gt;view_start ([$newvalue])</a></strong><br />
 </dt>
 <dd>
@@ -1284,11 +1316,11 @@ to replace only parts of a line. The font index in the rendition will
 automatically be updated.</p>
 </dd>
 <dd>
-<p><a href="#item__24text"><code>$text</code></a> is in a special encoding: tabs and wide characters that use more
-than one cell when displayed are padded with urxvt::NOCHAR characters
-(<code>chr 65535</code>). 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.</p>
+<p><a href="#item__24text"><code>$text</code></a> is in a special encoding: tabs and wide characters that use
+more than one cell when displayed are padded with <code>$urxvt::NOCHAR</code>
+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.</p>
 </dd>
 <dd>
 <p>You have to obey this encoding when changing text. The advantage is
@@ -1433,6 +1465,38 @@ Calls XUngrab for the most recent grab. Is called automatically on
 evaluation errors, as it is better to lose the grab in the error case as
 the session.
 </dd>
+<p></p>
+<dt><strong><a name="item_xinternatom">$atom = $term-&gt;XInternAtom ($atom_name[, $only_if_exists])</a></strong><br />
+</dt>
+<dt><strong><a name="item_xgetatomname">$atom_name = $term-&gt;XGetAtomName ($atom)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xlistproperties">@atoms = $term-&gt;XListProperties ($window)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xgetwindowproperty">($type,$format,$octets) = $term-&gt;XGetWindowProperty ($window, $property)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xchangewindowproperty">$term-&gt;XChangeWindowProperty ($window, $property, $type, $format, $octets)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xdeleteproperty">$term-&gt;XDeleteProperty ($window, $property)</a></strong><br />
+</dt>
+<dt><strong><a name="item_defaultrootwindow">$window = $term-&gt;DefaultRootWindow</a></strong><br />
+</dt>
+<dt><strong><a name="item_xreparentwindow">$term-&gt;XReparentWindow ($window, $parent, [$x, $y])</a></strong><br />
+</dt>
+<dt><strong><a name="item_xmapwindow">$term-&gt;XMapWindow ($window)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xunmapwindow">$term-&gt;XUnmapWindow ($window)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xmoveresizewindow">$term-&gt;XMoveResizeWindow ($window, $x, $y, $width, $height)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xtranslatecoordinates">($x, $y, $child_window) = $term-&gt;XTranslateCoordinates ($src, $dst, $x, $y)</a></strong><br />
+</dt>
+<dt><strong><a name="item_xchangeinput">$term-&gt;XChangeInput ($window, $add_events[, $del_events])</a></strong><br />
+</dt>
+<dd>
+Various X or X-related functions. The <code>$term</code> object only serves as
+the source of the display, otherwise those functions map more-or-less
+directory onto the X functions of the same name.
+</dd>
 <p></p></dl>
 <p>
 </p>
index b7cc04f..785ec7f 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -231,7 +231,7 @@ runtime.
 .IX Item "selection-popup (enabled by default)"
 Binds a popup menu to Ctrl\-Button3 that lets you convert the selection
 text into various other formats/action (such as uri unescaping, perl
-evalution, web-browser starting etc.), depending on content.
+evaluation, web-browser starting etc.), depending on content.
 .Sp
 Other extensions can extend this popup menu by pushing a code reference
 onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, that is called whenever the
@@ -309,6 +309,19 @@ To expand the example above to typical perl error messages (\*(L"\s-1XXX\s0 at
 The first line tells the selection code to treat the unchanging part of
 every error message as a selection pattern, and the second line transforms
 the message into vi commands to load the file.
+.IP "readline" 4
+.IX Item "readline"
+A support package that tries to make editing with readline easier. At the
+moment, it reacts to clicking with the left mouse button by trying to
+move the text cursor to this position. It does so by generating as many
+cursor-left or cursor-right keypresses as required (the this only works
+for programs that correctly support wide characters).
+.Sp
+It only works when clicking into the same line (possibly extended over
+multiple rows) as the text cursor and on the primary screen, to reduce the
+risk of misinterpreting. The normal selection isn't disabled, so quick
+successive clicks might interfere with selection creation in harmless
+ways.
 .IP "tabbed" 4
 .IX Item "tabbed"
 This transforms the terminal into a tabbar with additional terminals, that
@@ -316,8 +329,9 @@ is, it implements what is commonly refered to as \*(L"tabbed terminal\*(R". The
 displays a \*(L"[\s-1NEW\s0]\*(R" button, which, when clicked, will add a new tab, followed by one
 button per tab.
 .Sp
-Clicking a button will activate that tab. Pressing Shift-Left and
-Shift-Right will switch to the tab left or right of the current one.
+Clicking a button will activate that tab. Pressing \fBShift-Left\fR and
+\&\fBShift-Right\fR will switch to the tab left or right of the current one,
+while \fBShift-Down\fR creates a new tab.
 .IP "mark-urls" 4
 .IX Item "mark-urls"
 Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline urls and
@@ -607,6 +621,9 @@ focus out processing.
 .el .IP "on_configure_notify \f(CW$term\fR, \f(CW$event\fR" 4
 .IX Item "on_configure_notify $term, $event"
 .PD 0
+.ie n .IP "on_property_notify $term\fR, \f(CW$event" 4
+.el .IP "on_property_notify \f(CW$term\fR, \f(CW$event\fR" 4
+.IX Item "on_property_notify $term, $event"
 .ie n .IP "on_key_press $term\fR, \f(CW$event\fR, \f(CW$keysym\fR, \f(CW$octets" 4
 .el .IP "on_key_press \f(CW$term\fR, \f(CW$event\fR, \f(CW$keysym\fR, \f(CW$octets\fR" 4
 .IX Item "on_key_press $term, $event, $keysym, $octets"
@@ -633,8 +650,8 @@ Called whenever the corresponding X event is received for the terminal If
 the hook returns true, then the even will be ignored by rxvt\-unicode.
 .Sp
 The event is a hash with most values as named by Xlib (see the XEvent
-manpage), with the additional members \f(CW\*(C`row\*(C'\fR and \f(CW\*(C`col\*(C'\fR, which are the row
-and column under the mouse cursor.
+manpage), with the additional members \f(CW\*(C`row\*(C'\fR and \f(CW\*(C`col\*(C'\fR, which are the
+(real, not screen\-based) row and column under the mouse cursor.
 .Sp
 \&\f(CW\*(C`on_key_press\*(C'\fR additionally receives the string rxvt-unicode would
 output, if any, in locale-specific encoding.
@@ -999,6 +1016,9 @@ string is a normal text string, not in locale-dependent encoding.
 Normally its not a good idea to use this function, as programs might be
 confused by changes in cursor position or scrolling. Its useful inside a
 \&\f(CW\*(C`on_add_lines\*(C'\fR hook, though.
+.IP "$term\->scr_change_screen ($screen)" 4
+.IX Item "$term->scr_change_screen ($screen)"
+Switch to given screen \- 0 primary, 1 secondary.
 .IP "$term\->cmd_parse ($octets)" 4
 .IX Item "$term->cmd_parse ($octets)"
 Similar to \f(CW\*(C`scr_add_lines\*(C'\fR, but the argument must be in the
@@ -1097,6 +1117,10 @@ similar to \f(CW\*(C`\e%ENV\*(C'\fR.
 .PD
 Return the modifier masks corresponding to the \*(L"\s-1ISO\s0 Level 3 Shift\*(R" (often
 AltGr), the meta key (often Alt) and the num lock key, if applicable.
+.ie n .IP "$screen = $term\->current_screen" 4
+.el .IP "$screen = \f(CW$term\fR\->current_screen" 4
+.IX Item "$screen = $term->current_screen"
+Returns the currently displayed screen (0 primary, 1 secondary).
 .ie n .IP "$view_start = $term\->view_start ([$newvalue])" 4
 .el .IP "$view_start = \f(CW$term\fR\->view_start ([$newvalue])" 4
 .IX Item "$view_start = $term->view_start ([$newvalue])"
@@ -1124,11 +1148,11 @@ line, starting at column \f(CW$start_col\fR (default \f(CW0\fR), which is useful
 to replace only parts of a line. The font index in the rendition will
 automatically be updated.
 .Sp
-\&\f(CW$text\fR is in a special encoding: tabs and wide characters that use more
-than one cell when displayed are padded with urxvt::NOCHAR characters
-(\f(CW\*(C`chr 65535\*(C'\fR). 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.
+\&\f(CW$text\fR is in a special encoding: tabs and wide characters that use
+more than one cell when displayed are padded with \f(CW$urxvt::NOCHAR\fR
+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.
 .Sp
 You have to obey this encoding when changing text. The advantage is
 that \f(CW\*(C`substr\*(C'\fR and similar functions work on screen cells and not on
@@ -1235,6 +1259,48 @@ recent grab.
 Calls XUngrab for the most recent grab. Is called automatically on
 evaluation errors, as it is better to lose the grab in the error case as
 the session.
+.ie n .IP "$atom = $term\fR\->XInternAtom ($atom_name[, \f(CW$only_if_exists])" 4
+.el .IP "$atom = \f(CW$term\fR\->XInternAtom ($atom_name[, \f(CW$only_if_exists\fR])" 4
+.IX Item "$atom = $term->XInternAtom ($atom_name[, $only_if_exists])"
+.PD 0
+.ie n .IP "$atom_name = $term\->XGetAtomName ($atom)" 4
+.el .IP "$atom_name = \f(CW$term\fR\->XGetAtomName ($atom)" 4
+.IX Item "$atom_name = $term->XGetAtomName ($atom)"
+.ie n .IP "@atoms = $term\->XListProperties ($window)" 4
+.el .IP "@atoms = \f(CW$term\fR\->XListProperties ($window)" 4
+.IX Item "@atoms = $term->XListProperties ($window)"
+.ie n .IP "($type,$format,$octets) = $term\fR\->XGetWindowProperty ($window, \f(CW$property)" 4
+.el .IP "($type,$format,$octets) = \f(CW$term\fR\->XGetWindowProperty ($window, \f(CW$property\fR)" 4
+.IX Item "($type,$format,$octets) = $term->XGetWindowProperty ($window, $property)"
+.ie n .IP "$term\->XChangeWindowProperty ($window, $property\fR, \f(CW$type\fR, \f(CW$format\fR, \f(CW$octets)" 4
+.el .IP "$term\->XChangeWindowProperty ($window, \f(CW$property\fR, \f(CW$type\fR, \f(CW$format\fR, \f(CW$octets\fR)" 4
+.IX Item "$term->XChangeWindowProperty ($window, $property, $type, $format, $octets)"
+.ie n .IP "$term\->XDeleteProperty ($window, $property)" 4
+.el .IP "$term\->XDeleteProperty ($window, \f(CW$property\fR)" 4
+.IX Item "$term->XDeleteProperty ($window, $property)"
+.ie n .IP "$window = $term\->DefaultRootWindow" 4
+.el .IP "$window = \f(CW$term\fR\->DefaultRootWindow" 4
+.IX Item "$window = $term->DefaultRootWindow"
+.ie n .IP "$term\->XReparentWindow ($window, $parent\fR, [$x, \f(CW$y])" 4
+.el .IP "$term\->XReparentWindow ($window, \f(CW$parent\fR, [$x, \f(CW$y\fR])" 4
+.IX Item "$term->XReparentWindow ($window, $parent, [$x, $y])"
+.IP "$term\->XMapWindow ($window)" 4
+.IX Item "$term->XMapWindow ($window)"
+.IP "$term\->XUnmapWindow ($window)" 4
+.IX Item "$term->XUnmapWindow ($window)"
+.ie n .IP "$term\->XMoveResizeWindow ($window, $x\fR, \f(CW$y\fR, \f(CW$width\fR, \f(CW$height)" 4
+.el .IP "$term\->XMoveResizeWindow ($window, \f(CW$x\fR, \f(CW$y\fR, \f(CW$width\fR, \f(CW$height\fR)" 4
+.IX Item "$term->XMoveResizeWindow ($window, $x, $y, $width, $height)"
+.ie n .IP "($x, $y\fR, \f(CW$child_window\fR) = \f(CW$term\fR\->XTranslateCoordinates ($src, \f(CW$dst\fR, \f(CW$x\fR, \f(CW$y)" 4
+.el .IP "($x, \f(CW$y\fR, \f(CW$child_window\fR) = \f(CW$term\fR\->XTranslateCoordinates ($src, \f(CW$dst\fR, \f(CW$x\fR, \f(CW$y\fR)" 4
+.IX Item "($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x, $y)"
+.ie n .IP "$term\->XChangeInput ($window, $add_events\fR[, \f(CW$del_events])" 4
+.el .IP "$term\->XChangeInput ($window, \f(CW$add_events\fR[, \f(CW$del_events\fR])" 4
+.IX Item "$term->XChangeInput ($window, $add_events[, $del_events])"
+.PD
+Various X or X\-related functions. The \f(CW$term\fR object only serves as
+the source of the display, otherwise those functions map more-or-less
+directory onto the X functions of the same name.
 .ie n .Sh "The ""urxvt::popup"" Class"
 .el .Sh "The \f(CWurxvt::popup\fP Class"
 .IX Subsection "The urxvt::popup Class"
index 6db9b43..c113451 100644 (file)
@@ -77,8 +77,8 @@ PREPACKAGED EXTENSIONS
     selection-popup (enabled by default)
         Binds a popup menu to Ctrl-Button3 that lets you convert the
         selection text into various other formats/action (such as uri
-        unescaping, perl evalution, web-browser starting etc.), depending on
-        content.
+        unescaping, perl evaluation, web-browser starting etc.), depending
+        on content.
 
         Other extensions can extend this popup menu by pushing a code
         reference onto "@{ $term-"{selection_popup_hook} }>, that is called
@@ -149,6 +149,20 @@ PREPACKAGED EXTENSIONS
         of every error message as a selection pattern, and the second line
         transforms the message into vi commands to load the file.
 
+    readline
+        A support package that tries to make editing with readline easier.
+        At the moment, it reacts to clicking with the left mouse button by
+        trying to move the text cursor to this position. It does so by
+        generating as many cursor-left or cursor-right keypresses as
+        required (the this only works for programs that correctly support
+        wide characters).
+
+        It only works when clicking into the same line (possibly extended
+        over multiple rows) as the text cursor and on the primary screen, to
+        reduce the risk of misinterpreting. The normal selection isn't
+        disabled, so quick successive clicks might interfere with selection
+        creation in harmless ways.
+
     tabbed
         This transforms the terminal into a tabbar with additional
         terminals, that is, it implements what is commonly refered to as
@@ -157,7 +171,8 @@ PREPACKAGED EXTENSIONS
         tab.
 
         Clicking a button will activate that tab. Pressing Shift-Left and
-        Shift-Right will switch to the tab left or right of the current one.
+        Shift-Right will switch to the tab left or right of the current one,
+        while Shift-Down creates a new tab.
 
     mark-urls
         Uses per-line display filtering ("on_line_update") to underline urls
@@ -419,6 +434,7 @@ API DOCUMENTATION
         rxvt-unicode does focus out processing.
 
     on_configure_notify $term, $event
+    on_property_notify $term, $event
     on_key_press $term, $event, $keysym, $octets
     on_key_release $term, $event, $keysym
     on_button_press $term, $event
@@ -432,7 +448,8 @@ API DOCUMENTATION
 
         The event is a hash with most values as named by Xlib (see the
         XEvent manpage), with the additional members "row" and "col", which
-        are the row and column under the mouse cursor.
+        are the (real, not screen-based) row and column under the mouse
+        cursor.
 
         "on_key_press" additionally receives the string rxvt-unicode would
         output, if any, in locale-specific encoding.
@@ -759,6 +776,9 @@ API DOCUMENTATION
         be confused by changes in cursor position or scrolling. Its useful
         inside a "on_add_lines" hook, though.
 
+    $term->scr_change_screen ($screen)
+        Switch to given screen - 0 primary, 1 secondary.
+
     $term->cmd_parse ($octets)
         Similar to "scr_add_lines", but the argument must be in the
         locale-specific encoding of the terminal and can contain command
@@ -819,6 +839,9 @@ API DOCUMENTATION
         (often AltGr), the meta key (often Alt) and the num lock key, if
         applicable.
 
+    $screen = $term->current_screen
+        Returns the currently displayed screen (0 primary, 1 secondary).
+
     $view_start = $term->view_start ([$newvalue])
         Returns the row number of the topmost displayed line. Maximum value
         is 0, which displays the normal terminal contents. Lower values
@@ -844,10 +867,10 @@ API DOCUMENTATION
         automatically be updated.
 
         $text is in a special encoding: tabs and wide characters that use
-        more than one cell when displayed are padded with urxvt::NOCHAR
-        characters ("chr 65535"). 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.
+        more than one cell when displayed are padded with $urxvt::NOCHAR
+        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.
 
         You have to obey this encoding when changing text. The advantage is
         that "substr" and similar functions work on screen cells and not on
@@ -936,6 +959,25 @@ API DOCUMENTATION
         evaluation errors, as it is better to lose the grab in the error
         case as the session.
 
+    $atom = $term->XInternAtom ($atom_name[, $only_if_exists])
+    $atom_name = $term->XGetAtomName ($atom)
+    @atoms = $term->XListProperties ($window)
+    ($type,$format,$octets) = $term->XGetWindowProperty ($window, $property)
+    $term->XChangeWindowProperty ($window, $property, $type, $format,
+    $octets)
+    $term->XDeleteProperty ($window, $property)
+    $window = $term->DefaultRootWindow
+    $term->XReparentWindow ($window, $parent, [$x, $y])
+    $term->XMapWindow ($window)
+    $term->XUnmapWindow ($window)
+    $term->XMoveResizeWindow ($window, $x, $y, $width, $height)
+    ($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x,
+    $y)
+    $term->XChangeInput ($window, $add_events[, $del_events])
+        Various X or X-related functions. The $term object only serves as
+        the source of the display, otherwise those functions map
+        more-or-less directory onto the X functions of the same name.
+
   The "urxvt::popup" Class
     $popup->add_title ($title)
         Adds a non-clickable title to the popup.
index 93d1d4e..9592024 100644 (file)
@@ -63,9 +63,9 @@ enum codeset {
 codeset codeset_from_name (const char *name);
 
 enum {
-  ZERO_WIDTH_CHAR = 0x200b,
+  ZERO_WIDTH_CHAR  = 0x200b,
   REPLACEMENT_CHAR = 0xfffd,
-  NOCHAR = 65535, // must be invalid in ANY codeset (!)
+  NOCHAR           = 0xfffe, // must be invalid in ANY codeset (!)
 };
 
 struct rxvt_codeset_conv {
index a0213b1..b11ada8 100644 (file)
@@ -8,11 +8,21 @@ sub on_button_press {
    my $cur = $line->offset_of ($row, $col);
    my $ofs = $line->offset_of ($event->{row}, $event->{col});
 
-   if ($ofs >= 0 && $ofs < $line->l) {
+   if ($ofs >= 0 && $ofs < $line->l && !$self->current_screen) {
       my $diff = $ofs - $cur;
+      my $move;
 
-      $self->tt_write ($diff < 0 ? "\x1b[D" x -$diff
-                                 : "\x1b[C" x $diff);
+      if ($diff < 0) {
+         ($ofs, $cur) = ($cur, $ofs);
+         $move = "\x1b[D";
+      } else {
+         $move = "\x1b[C";
+      }
+
+      my $skipped = substr $line->t, $cur, $ofs - $cur;
+      $skipped =~ s/$urxvt::NOCHAR//g;
+
+      $self->tt_write ($move x length $skipped);
    }
 
    ()
index 3373789..22c5bbc 100644 (file)
@@ -998,7 +998,6 @@ struct rxvt_term : zero_initialized, rxvt_vars {
                   am_pixmap_trans:1,   /* transparency w/known root pixmap  */
 #endif
                   current_screen:1,    /* primary or secondary              */
-                  hate_those_clicks:1, /* a.k.a. keep mark position         */
                   num_scr_allow:1,
                   bypass_keystate:1,
 #ifdef CURSOR_BLINK
index 02813f5..af04e42 100644 (file)
@@ -1119,12 +1119,14 @@ rxvt_term::ModLevel3Mask ()
            ModLevel3Mask  = 0
            ModMetaMask    = 1
            ModNumLockMask = 2
+           current_screen = 3
        CODE:
         switch (ix)
           {
            case 0: RETVAL = THIS->ModLevel3Mask;  break;
            case 1: RETVAL = THIS->ModMetaMask;    break;
            case 2: RETVAL = THIS->ModNumLockMask; break;
+           case 3: RETVAL = THIS->current_screen; break;
           }
         OUTPUT:
         RETVAL
@@ -1591,6 +1593,9 @@ void
 rxvt_term::scr_bell ()
 
 void
+rxvt_term::scr_change_screen (int screen)
+
+void
 rxvt_term::scr_add_lines (SV *string)
        CODE:
 {
index 51f1c10..1552dc1 100644 (file)
@@ -164,6 +164,20 @@ The first line tells the selection code to treat the unchanging part of
 every error message as a selection pattern, and the second line transforms
 the message into vi commands to load the file.
 
+=item readline
+
+A support package that tries to make editing with readline easier. At the
+moment, it reacts to clicking with the left mouse button by trying to
+move the text cursor to this position. It does so by generating as many
+cursor-left or cursor-right keypresses as required (the this only works
+for programs that correctly support wide characters).
+
+It only works when clicking into the same line (possibly extended over
+multiple rows) as the text cursor and on the primary screen, to reduce the
+risk of misinterpreting. The normal selection isn't disabled, so quick
+successive clicks might interfere with selection creation in harmless
+ways.
+
 =item tabbed
 
 This transforms the terminal into a tabbar with additional terminals, that
@@ -540,6 +554,8 @@ our $RESNAME;
 our $RESCLASS;
 our $RXVTNAME;
 
+our $NOCHAR = chr 0xfffe;
+
 =head2 Variables in the C<urxvt> Package
 
 =over 4
@@ -1262,6 +1278,10 @@ Normally its not a good idea to use this function, as programs might be
 confused by changes in cursor position or scrolling. Its useful inside a
 C<on_add_lines> hook, though.
 
+=item $term->scr_change_screen ($screen)
+
+Switch to given screen - 0 primary, 1 secondary.
+
 =item $term->cmd_parse ($octets)
 
 Similar to C<scr_add_lines>, but the argument must be in the
@@ -1354,6 +1374,10 @@ sub env {
 Return the modifier masks corresponding to the "ISO Level 3 Shift" (often
 AltGr), the meta key (often Alt) and the num lock key, if applicable.
 
+=item $screen = $term->current_screen
+
+Returns the currently displayed screen (0 primary, 1 secondary).
+
 =item $view_start = $term->view_start ([$newvalue])
 
 Returns the row number of the topmost displayed line. Maximum value is
@@ -1381,11 +1405,11 @@ 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 urxvt::NOCHAR characters
-(C<chr 65535>). 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.
+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>
+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.
 
 You have to obey this encoding when changing text. The advantage is
 that C<substr> and similar functions work on screen cells and not on