*** empty log message ***
authorroot <root>
Thu, 12 Jan 2006 05:37:34 +0000 (05:37 +0000)
committerroot <root>
Thu, 12 Jan 2006 05:37:34 +0000 (05:37 +0000)
15 files changed:
Changes
README.FAQ
doc/rxvt.1.html
doc/rxvt.1.man.in
doc/rxvt.1.pod
doc/rxvt.1.txt
doc/rxvt.7.html
doc/rxvt.7.man.in
doc/rxvt.7.pod
doc/rxvt.7.txt
doc/rxvtperl.3.html
doc/rxvtperl.3.man.in
doc/rxvtperl.3.txt
src/perl/searchable-scrollback
src/urxvt.pm

diff --git a/Changes b/Changes
index 71e979ab0956f8083b4f71c2452b85d49cdf2dd8..85c149e81bfe1763f6e6bae45b3b5459ee2fc324 100644 (file)
--- a/Changes
+++ b/Changes
@@ -13,9 +13,6 @@ WISH: just for fun, do shade and tint with XRender.
 WISH: support tex fonts
 
 7.0
-TODO: document searchable-scorllback hotkey
-TODO: double-click and right-extend
-TODO: change scrollback to use cursor movements
        - added sections for DISTRIBUTION MAINTAINERS and about
           SETUID/SETGID to the FAQ.
         - selection, searchable-scrollback, selection-popup and
index 9fb334bdb23d8a11327c7a4f22cf52cdacc4df5f..2685bde81efaaf9ec22629aecf53d66fdfe2a1c6 100644 (file)
@@ -1,4 +1,26 @@
 FREQUENTLY ASKED QUESTIONS
+    I don't like the new selection/popups/hotkeys/perl, how do I
+    change/disable it?
+        You can disable the perl extension completely by setting the
+        perl-ext-common resource to the empty string, which also keeps
+        rxvt-unicode from initialising perl, saving memory.
+
+        If you only want to disable specific features, you first have to
+        identify which perl extension is responsible. For this, read the
+        section PREPACKAGED EXTENSIONS in the rxvtperl(3) manpage. For
+        example, to disable the selection-popup and option-popup, specify
+        this perl-ext-common resource:
+
+           URxvt.perl-ext-common: default,-selection-popup,-option-popup
+
+        This will keep the default extensions, but disable the two popup
+        extensions. Some extensions can also be configured, for example,
+        scrollback search mode is triggered by M-s. You can move it to any
+        other combination either by setting the searchable-scrollback
+        resource:
+
+           URxvt.searchable-scrollback: CM-s
+
     Isn't rxvt supposed to be small? Don't all those features bloat?
         I often get asked about this, and I think, no, they didn't cause
         extra bloat. If you compare a minimal rxvt and a minimal urxvt, you
index 08fa8a1692bb41854222292b48f2f3d1b31d1640..817b9a7c9db96e6f825a0c0d647b030725378973 100644 (file)
@@ -1496,6 +1496,13 @@ will be ignored when running setuid/setgid.
 <p>See the <code>rxvtperl(3)</code> manpage.</p>
 </dd>
 <p></p>
+<dt><strong><a name="item_searchable_2dscrollback_3a_keysym"><strong>searchable-scrollback:</strong> <em>keysym</em></a></strong><br />
+</dt>
+<dd>
+Sets the hotkey that starts the incremental scrollback buffer search
+(default: <code>M-s</code>).
+</dd>
+<p></p>
 <dt><strong><a name="item_urllauncher_3a_string"><strong>urlLauncher</strong>: <em>string</em></a></strong><br />
 </dt>
 <dd>
index f05c7a946023786d8320a3b03addac7154762ce7..a6a33b8d476935857fb0bda476dc502418d8713f 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "rxvt 1"
-.TH rxvt 1 "2006-01-11" "7.0" "RXVT-UNICODE"
+.TH rxvt 1 "2006-01-12" "7.0" "RXVT-UNICODE"
 .SH "NAME"
 rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system)
 .SH "SYNOPSIS"
@@ -1140,6 +1140,10 @@ scripts. When looking for extensions specified by the \f(CW\*(C`perl\*(C'\fR res
 will be ignored when running setuid/setgid.
 .Sp
 See the @@RXVT_NAME@@\fIperl\fR\|(3) manpage.
+.IP "\fBsearchable\-scrollback:\fR \fIkeysym\fR" 4
+.IX Item "searchable-scrollback: keysym"
+Sets the hotkey that starts the incremental scrollback buffer search
+(default: \f(CW\*(C`M\-s\*(C'\fR).
 .IP "\fBurlLauncher\fR: \fIstring\fR" 4
 .IX Item "urlLauncher: string"
 Specifies the program to be started with a \s-1URL\s0 argument. Used by the
index b612d9bf50db837949167834cfb76ceb807208ce..0887d078bb10babc2a2adb1cb1f8768ac6c4c603 100644 (file)
@@ -1117,6 +1117,11 @@ will be ignored when running setuid/setgid.
 
 See the @@RXVT_NAME@@perl(3) manpage.
 
+=item B<searchable-scrollback:> I<keysym>
+
+Sets the hotkey that starts the incremental scrollback buffer search
+(default: C<M-s>).
+
 =item B<urlLauncher>: I<string>
 
 Specifies the program to be started with a URL argument. Used by the
index 5a8733439e40d5793effa12794406833352a06a1..1016d4625dc00a65597c618d03346603c074fe3e 100644 (file)
@@ -975,6 +975,10 @@ RESOURCES (available also as long-options)
 
         See the rxvtperl(3) manpage.
 
+    searchable-scrollback: *keysym*
+        Sets the hotkey that starts the incremental scrollback buffer search
+        (default: "M-s").
+
     urlLauncher: *string*
         Specifies the program to be started with a URL argument. Used by the
         "selection-popup" and "mark-urls" perl extensions.
index 479d9b32f5618a7c91abab28587aa8e8b1953259..97b522d66feb42cc75a3bf759b7015886cabc84a 100644 (file)
@@ -75,6 +75,36 @@ also available on the World Wide Web at
 <hr />
 <h1><a name="frequently_asked_questions">FREQUENTLY ASKED QUESTIONS</a></h1>
 <dl>
+<dt><strong><a name="item_i_don_27t_like_the_new_selection_2fpopups_2fhotkey">I don't like the new selection/popups/hotkeys/perl, how do I
+change/disable it?</a></strong><br />
+</dt>
+<dd>
+You can disable the perl extension completely by setting the
+<strong>perl-ext-common</strong> resource to the empty string, which also keeps
+rxvt-unicode from initialising perl, saving memory.
+</dd>
+<dd>
+<p>If you only want to disable specific features, you first have to
+identify which perl extension is responsible. For this, read the section
+<strong>PREPACKAGED EXTENSIONS</strong> in the <code>rxvtperl(3)</code> manpage. For
+example, to disable the <strong>selection-popup</strong> and <strong>option-popup</strong>, specify
+this <strong>perl-ext-common</strong> resource:</p>
+</dd>
+<dd>
+<pre>
+   URxvt.perl-ext-common: default,-selection-popup,-option-popup</pre>
+</dd>
+<dd>
+<p>This will keep the default extensions, but disable the two popup
+extensions. Some extensions can also be configured, for example,
+scrollback search mode is triggered by <strong>M-s</strong>. You can move it to any
+other combination either by setting the <strong>searchable-scrollback</strong> resource:</p>
+</dd>
+<dd>
+<pre>
+   URxvt.searchable-scrollback: CM-s</pre>
+</dd>
+<p></p>
 <dt><strong><a name="item_isn_27t_rxvt_supposed_to_be_small_3f_don_27t_all_t">Isn't rxvt supposed to be small? Don't all those features bloat?</a></strong><br />
 </dt>
 <dd>
index 39b90dcb1b908597b969f989f445a0bce8882dc1..b74ef3dcd23f5fedd54ff7e58ae31397d0d00710 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "rxvt 7"
-.TH rxvt 7 "2006-01-11" "7.0" "RXVT-UNICODE"
+.TH rxvt 7 "2006-01-12" "7.0" "RXVT-UNICODE"
 .SH "NAME"
 RXVT REFERENCE \- FAQ, command sequences and other background information
 .SH "SYNOPSIS"
@@ -158,6 +158,30 @@ also available on the World Wide Web at
 <http://cvs.schmorp.de/browse/*checkout*/rxvt\-unicode/doc/rxvt.7.html>.
 .SH "FREQUENTLY ASKED QUESTIONS"
 .IX Header "FREQUENTLY ASKED QUESTIONS"
+.IP "I don't like the new selection/popups/hotkeys/perl, how do I change/disable it?" 4
+.IX Item "I don't like the new selection/popups/hotkeys/perl, how do I change/disable it?"
+You can disable the perl extension completely by setting the
+\&\fBperl-ext-common\fR resource to the empty string, which also keeps
+rxvt-unicode from initialising perl, saving memory.
+.Sp
+If you only want to disable specific features, you first have to
+identify which perl extension is responsible. For this, read the section
+\&\fB\s-1PREPACKAGED\s0 \s-1EXTENSIONS\s0\fR in the @@RXVT_NAME@@\fIperl\fR\|(3) manpage. For
+example, to disable the \fBselection-popup\fR and \fBoption-popup\fR, specify
+this \fBperl-ext-common\fR resource:
+.Sp
+.Vb 1
+\&   URxvt.perl-ext-common: default,-selection-popup,-option-popup
+.Ve
+.Sp
+This will keep the default extensions, but disable the two popup
+extensions. Some extensions can also be configured, for example,
+scrollback search mode is triggered by \fBM\-s\fR. You can move it to any
+other combination either by setting the \fBsearchable-scrollback\fR resource:
+.Sp
+.Vb 1
+\&   URxvt.searchable-scrollback: CM-s
+.Ve
 .IP "Isn't rxvt supposed to be small? Don't all those features bloat?" 4
 .IX Item "Isn't rxvt supposed to be small? Don't all those features bloat?"
 I often get asked about this, and I think, no, they didn't cause extra
index 97bbc10bffddc0627277308d1cdcbffb900f313b..51ade03f7e9cd2570c73bc77d4c225169c745e6a 100644 (file)
@@ -26,6 +26,28 @@ L<http://cvs.schmorp.de/browse/*checkout*/rxvt-unicode/doc/rxvt.7.html>.
 
 =over 4
 
+=item I don't like the new selection/popups/hotkeys/perl, how do I
+change/disable it?
+
+You can disable the perl extension completely by setting the
+B<perl-ext-common> resource to the empty string, which also keeps
+rxvt-unicode from initialising perl, saving memory.
+
+If you only want to disable specific features, you first have to
+identify which perl extension is responsible. For this, read the section
+B<PREPACKAGED EXTENSIONS> in the @@RXVT_NAME@@perl(3) manpage. For
+example, to disable the B<selection-popup> and B<option-popup>, specify
+this B<perl-ext-common> resource:
+
+   URxvt.perl-ext-common: default,-selection-popup,-option-popup
+
+This will keep the default extensions, but disable the two popup
+extensions. Some extensions can also be configured, for example,
+scrollback search mode is triggered by B<M-s>. You can move it to any
+other combination either by setting the B<searchable-scrollback> resource:
+
+   URxvt.searchable-scrollback: CM-s
+
 =item Isn't rxvt supposed to be small? Don't all those features bloat?
 
 I often get asked about this, and I think, no, they didn't cause extra
index becc43daa877b50bafae9c65ad24ef0f01b2d527..257ec8aa656740ce49b908de6ca0f6526a7914ce 100644 (file)
@@ -20,6 +20,28 @@ DESCRIPTION
     <http://cvs.schmorp.de/browse/*checkout*/rxvt-unicode/doc/rxvt.7.html>.
 
 FREQUENTLY ASKED QUESTIONS
+    I don't like the new selection/popups/hotkeys/perl, how do I
+    change/disable it?
+        You can disable the perl extension completely by setting the
+        perl-ext-common resource to the empty string, which also keeps
+        rxvt-unicode from initialising perl, saving memory.
+
+        If you only want to disable specific features, you first have to
+        identify which perl extension is responsible. For this, read the
+        section PREPACKAGED EXTENSIONS in the rxvtperl(3) manpage. For
+        example, to disable the selection-popup and option-popup, specify
+        this perl-ext-common resource:
+
+           URxvt.perl-ext-common: default,-selection-popup,-option-popup
+
+        This will keep the default extensions, but disable the two popup
+        extensions. Some extensions can also be configured, for example,
+        scrollback search mode is triggered by M-s. You can move it to any
+        other combination either by setting the searchable-scrollback
+        resource:
+
+           URxvt.searchable-scrollback: CM-s
+
     Isn't rxvt supposed to be small? Don't all those features bloat?
         I often get asked about this, and I think, no, they didn't cause
         extra bloat. If you compare a minimal rxvt and a minimal urxvt, you
index 6dbda25bb645702982b4e44a6b76a72e6c7398de..141b077a76cbf17421b5680c34a67908fe8650e1 100644 (file)
@@ -87,9 +87,14 @@ find them in <em>/opt/rxvt/lib/urxvt/perl/</em>.</p>
 </dt>
 <dd>
 (More) intelligent selection. This extension tries to be more intelligent
-when the user extends selections (double-click). Right now, it tries to
-select urls and complete shell-quoted arguments, which is very convenient,
-too, if your <em>ls</em> supports <code>--quoting-style=shell</code>.
+when the user extends selections (double-click and further clicks). Right
+now, it tries to select words, urls and complete shell-quoted
+arguments, which is very convenient, too, if your <em>ls</em> supports
+<code>--quoting-style=shell</code>.
+</dd>
+<dd>
+<p>A double-click usually selects the word under the cursor, further clicks
+will enlarge the selection.</p>
 </dd>
 <dd>
 <p>It also offers the following bindable keyboard command:</p>
@@ -124,14 +129,18 @@ evalution, web-browser starting etc.), depending on content.
 </dt>
 <dd>
 Adds regex search functionality to the scrollback buffer, triggered
-by a hotkey (default: <code>M-s</code>). When in search mode, normal terminal
-input/output is suspended.
+by a hotkey (default: <code>M-s</code>). While in search mode, normal terminal
+input/output is suspended and a regex is displayed at the bottom of the
+screen.
 </dd>
 <dd>
-<p><code>/</code> starts an incremental regex search, <code>n</code> searches further, <code>p</code> or
-<code>N</code> jump to the previous match, <code>G</code> jumps to the bottom and clears the
-history, <code>enter</code> leaves search mode at the current position and <code>escape</code>
-returns to the original position.</p>
+<p>Inputting characters appends them to the regex and continues incremental
+search. <code>BackSpace</code> removes a character from the regex, <code>Up</code> and <code>Down</code>
+search upwards/downwards in the scrollback buffer, <code>End</code> jumps to the
+bottom. <code>Escape</code> leaves search mode and returns to the point where search
+was started, while <code>Enter</code> or <code>Return</code> stay at the current position and
+additionally stores the first match in the current line into the primary
+selection.</p>
 </dd>
 <p></p>
 <dt><strong><a name="item_digital_2dclock">digital-clock</a></strong><br />
@@ -144,8 +153,9 @@ Displays a digital clock using the built-in overlay.
 </dt>
 <dd>
 Uses per-line display filtering (<code>on_line_update</code>) to underline urls and
-make them clickable. When clicked, the program specified in the resource
-<code>urlLauncher</code> (default <code>x-www-browser</code>) will be started.
+make them clickable. When middle-clicked, the program specified in the
+resource <code>urlLauncher</code> (default <code>x-www-browser</code>) will be started with
+the URL as first argument.
 </dd>
 <p></p>
 <dt><strong><a name="item_block_2dgraphics_2dto_2dascii">block-graphics-to-ascii</a></strong><br />
@@ -305,7 +315,9 @@ by calling <a href="#item_selection"><code>$term-&gt;selection</code></a>.
 Called whenever the user tries to extend the selection (e.g. with a double
 click) and is either supposed to return false (normal operation), or
 should extend the selection itelf and return true to suppress the built-in
-processing.
+processing. This can happen multiple times, as long as the callback
+returns true, it will be called on every further click by the user and is
+supposed to enlarge the selection more and more, if possible.
 </dd>
 <dd>
 <p>See the <em>selection</em> example extension.</p>
@@ -738,11 +750,21 @@ Return the current values of the selection mark, begin or end positions,
 and optionally set them to new values.
 </dd>
 <p></p>
+<dt><strong><a name="item_selection_make">$term-&gt;selection_make ($eventtime[, $rectangular])</a></strong><br />
+</dt>
+<dd>
+Tries to make a selection as set by <a href="#item_selection_beg"><code>selection_beg</code></a> and
+<a href="#item_selection_end"><code>selection_end</code></a>. If <code>$rectangular</code> is true (default: false), a
+rectangular selection will be made. This is the prefered function to make
+a selection.
+</dd>
+<p></p>
 <dt><strong><a name="item_selection_grab">$success = $term-&gt;selection_grab ($eventtime)</a></strong><br />
 </dt>
 <dd>
-Try to request the primary selection from the server (for example, as set
-by the next method).
+Try to request the primary selection text from the server (for example, as
+set by the next method). No visual feedback will be given. This function
+is mostly useful from within <code>on_sel_grab</code> hooks.
 </dd>
 <p></p>
 <dt><strong>$oldtext = $term-&gt;selection ([$newtext])</strong><br />
@@ -831,8 +853,8 @@ Convert the given locale-encoded octets into a perl string.
 </dt>
 <dd>
 XORs the rendition values in the given span with the provided value
-(default: <code>RS_RVid</code>). Useful in refresh hooks to provide effects similar
-to the selection.
+(default: <code>RS_RVid</code>), which <em>MUST NOT</em> contain font styles. Useful in
+refresh hooks to provide effects similar to the selection.
 </dd>
 <p></p>
 <dt><strong><a name="item_scr_xor_rect">$term-&gt;scr_xor_rect ($beg_row, $beg_col, $end_row, $end_col[, $rstyle1[, $rstyle2]])</a></strong><br />
@@ -841,7 +863,7 @@ to the selection.
 Similar to <a href="#item_scr_xor_span"><code>scr_xor_span</code></a>, but xors a rectangle instead. Trailing
 whitespace will additionally be xored with the <code>$rstyle2</code>, which defaults
 to <code>RS_RVid | RS_Uline</code>, which removes reverse video again and underlines
-it instead.
+it instead. Both styles <em>MUST NOT</em> contain font styles.
 </dd>
 <p></p>
 <dt><strong><a name="item_scr_bell">$term-&gt;scr_bell</a></strong><br />
@@ -1079,7 +1101,8 @@ Return the row number of the first/last row of the line, respectively.
 </dt>
 <dd>
 Returns the character offset of the given row|col pair within the logical
-line.
+line. Works for rows outside the line, too, and returns corresponding
+offsets outside the string.
 </dd>
 <p></p>
 <dt><strong><a name="item_coord_of">($row, $col) = $line-&gt;coord_of ($offset)</a></strong><br />
@@ -1317,7 +1340,9 @@ numbers indicate more verbose output.</p>
 </dt>
 <dt><strong><a name="item__3e_3d_3__2d_script_loading_and_management">&gt;= 3 - script loading and management</a></strong><br />
 </dt>
-<dt><strong><a name="item__3e_3d10__2d_all_events_received">&gt;=10 - all events received</a></strong><br />
+<dt><strong><a name="item__3e_3d10__2d_all_called_hooks">&gt;=10 - all called hooks</a></strong><br />
+</dt>
+<dt><strong><a name="item__3e_3d11__2d_hook_reutrn_values">&gt;=11 - hook reutrn values</a></strong><br />
 </dt>
 </dl>
 <p>
index fc0d7d27af36e0c814dc5c3700a27162ae590e41..e1bfa50f5cc65f3b2cbef8d1b63f804e334922f4 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "rxvt 3"
-.TH rxvt 3 "2006-01-11" "6.3" "RXVT-UNICODE"
+.TH rxvt 3 "2006-01-12" "7.0" "RXVT-UNICODE"
 .SH "NAME"
 @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
 .SH "SYNOPSIS"
@@ -175,9 +175,13 @@ You can activate them like this:
 .IP "selection (enabled by default)" 4
 .IX Item "selection (enabled by default)"
 (More) intelligent selection. This extension tries to be more intelligent
-when the user extends selections (double\-click). Right now, it tries to
-select urls and complete shell-quoted arguments, which is very convenient,
-too, if your \fIls\fR supports \f(CW\*(C`\-\-quoting\-style=shell\*(C'\fR.
+when the user extends selections (double\-click and further clicks). Right
+now, it tries to select words, urls and complete shell-quoted
+arguments, which is very convenient, too, if your \fIls\fR supports
+\&\f(CW\*(C`\-\-quoting\-style=shell\*(C'\fR.
+.Sp
+A double-click usually selects the word under the cursor, further clicks
+will enlarge the selection.
 .Sp
 It also offers the following bindable keyboard command:
 .RS 4
@@ -203,21 +207,26 @@ evalution, web-browser starting etc.), depending on content.
 .IP "searchable\-scrollback<hotkey> (enabled by default)" 4
 .IX Item "searchable-scrollback<hotkey> (enabled by default)"
 Adds regex search functionality to the scrollback buffer, triggered
-by a hotkey (default: \f(CW\*(C`M\-s\*(C'\fR). When in search mode, normal terminal
-input/output is suspended.
+by a hotkey (default: \f(CW\*(C`M\-s\*(C'\fR). While in search mode, normal terminal
+input/output is suspended and a regex is displayed at the bottom of the
+screen.
 .Sp
-\&\f(CW\*(C`/\*(C'\fR starts an incremental regex search, \f(CW\*(C`n\*(C'\fR searches further, \f(CW\*(C`p\*(C'\fR or
-\&\f(CW\*(C`N\*(C'\fR jump to the previous match, \f(CW\*(C`G\*(C'\fR jumps to the bottom and clears the
-history, \f(CW\*(C`enter\*(C'\fR leaves search mode at the current position and \f(CW\*(C`escape\*(C'\fR
-returns to the original position.
+Inputting characters appends them to the regex and continues incremental
+search. \f(CW\*(C`BackSpace\*(C'\fR removes a character from the regex, \f(CW\*(C`Up\*(C'\fR and \f(CW\*(C`Down\*(C'\fR
+search upwards/downwards in the scrollback buffer, \f(CW\*(C`End\*(C'\fR jumps to the
+bottom. \f(CW\*(C`Escape\*(C'\fR leaves search mode and returns to the point where search
+was started, while \f(CW\*(C`Enter\*(C'\fR or \f(CW\*(C`Return\*(C'\fR stay at the current position and
+additionally stores the first match in the current line into the primary
+selection.
 .IP "digital-clock" 4
 .IX Item "digital-clock"
 Displays a digital clock using the built-in overlay.
 .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
-make them clickable. When clicked, the program specified in the resource
-\&\f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started.
+make them clickable. When middle\-clicked, the program specified in the
+resource \f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started with
+the \s-1URL\s0 as first argument.
 .IP "block-graphics-to-ascii" 4
 .IX Item "block-graphics-to-ascii"
 A not very useful example of filtering all text output to the terminal,
@@ -341,7 +350,9 @@ Returning a true value aborts selection grabbing. It will still be hilighted.
 Called whenever the user tries to extend the selection (e.g. with a double
 click) and is either supposed to return false (normal operation), or
 should extend the selection itelf and return true to suppress the built-in
-processing.
+processing. This can happen multiple times, as long as the callback
+returns true, it will be called on every further click by the user and is
+supposed to enlarge the selection more and more, if possible.
 .Sp
 See the \fIselection\fR example extension.
 .ie n .IP "on_view_change $term\fR, \f(CW$offset" 4
@@ -685,11 +696,19 @@ set it (which is usually bad as applications don't expect that).
 .PD
 Return the current values of the selection mark, begin or end positions,
 and optionally set them to new values.
+.ie n .IP "$term\->selection_make ($eventtime[, $rectangular])" 4
+.el .IP "$term\->selection_make ($eventtime[, \f(CW$rectangular\fR])" 4
+.IX Item "$term->selection_make ($eventtime[, $rectangular])"
+Tries to make a selection as set by \f(CW\*(C`selection_beg\*(C'\fR and
+\&\f(CW\*(C`selection_end\*(C'\fR. If \f(CW$rectangular\fR is true (default: false), a
+rectangular selection will be made. This is the prefered function to make
+a selection.
 .ie n .IP "$success = $term\->selection_grab ($eventtime)" 4
 .el .IP "$success = \f(CW$term\fR\->selection_grab ($eventtime)" 4
 .IX Item "$success = $term->selection_grab ($eventtime)"
-Try to request the primary selection from the server (for example, as set
-by the next method).
+Try to request the primary selection text from the server (for example, as
+set by the next method). No visual feedback will be given. This function
+is mostly useful from within \f(CW\*(C`on_sel_grab\*(C'\fR hooks.
 .ie n .IP "$oldtext = $term\->selection ([$newtext])" 4
 .el .IP "$oldtext = \f(CW$term\fR\->selection ([$newtext])" 4
 .IX Item "$oldtext = $term->selection ([$newtext])"
@@ -754,15 +773,15 @@ Convert the given locale-encoded octets into a perl string.
 .el .IP "$term\->scr_xor_span ($beg_row, \f(CW$beg_col\fR, \f(CW$end_row\fR, \f(CW$end_col\fR[, \f(CW$rstyle\fR])" 4
 .IX Item "$term->scr_xor_span ($beg_row, $beg_col, $end_row, $end_col[, $rstyle])"
 XORs the rendition values in the given span with the provided value
-(default: \f(CW\*(C`RS_RVid\*(C'\fR). Useful in refresh hooks to provide effects similar
-to the selection.
+(default: \f(CW\*(C`RS_RVid\*(C'\fR), which \fI\s-1MUST\s0 \s-1NOT\s0\fR contain font styles. Useful in
+refresh hooks to provide effects similar to the selection.
 .ie n .IP "$term\->scr_xor_rect ($beg_row, $beg_col\fR, \f(CW$end_row\fR, \f(CW$end_col\fR[, \f(CW$rstyle1\fR[, \f(CW$rstyle2]])" 4
 .el .IP "$term\->scr_xor_rect ($beg_row, \f(CW$beg_col\fR, \f(CW$end_row\fR, \f(CW$end_col\fR[, \f(CW$rstyle1\fR[, \f(CW$rstyle2\fR]])" 4
 .IX Item "$term->scr_xor_rect ($beg_row, $beg_col, $end_row, $end_col[, $rstyle1[, $rstyle2]])"
 Similar to \f(CW\*(C`scr_xor_span\*(C'\fR, but xors a rectangle instead. Trailing
 whitespace will additionally be xored with the \f(CW$rstyle2\fR, which defaults
 to \f(CW\*(C`RS_RVid | RS_Uline\*(C'\fR, which removes reverse video again and underlines
-it instead.
+it instead. Both styles \fI\s-1MUST\s0 \s-1NOT\s0\fR contain font styles.
 .IP "$term\->scr_bell" 4
 .IX Item "$term->scr_bell"
 Ring the bell!
@@ -960,7 +979,8 @@ Return the row number of the first/last row of the line, respectively.
 .el .IP "$offset = \f(CW$line\fR\->offset_of ($row, \f(CW$col\fR)" 4
 .IX Item "$offset = $line->offset_of ($row, $col)"
 Returns the character offset of the given row|col pair within the logical
-line.
+line. Works for rows outside the line, too, and returns corresponding
+offsets outside the string.
 .ie n .IP "($row, $col\fR) = \f(CW$line\->coord_of ($offset)" 4
 .el .IP "($row, \f(CW$col\fR) = \f(CW$line\fR\->coord_of ($offset)" 4
 .IX Item "($row, $col) = $line->coord_of ($offset)"
@@ -1132,8 +1152,10 @@ numbers indicate more verbose output.
 .PD 0
 .IP ">= 3 \- script loading and management" 4
 .IX Item ">= 3 - script loading and management"
-.IP ">=10 \- all events received" 4
-.IX Item ">=10 - all events received"
+.IP ">=10 \- all called hooks" 4
+.IX Item ">=10 - all called hooks"
+.IP ">=11 \- hook reutrn values" 4
+.IX Item ">=11 - hook reutrn values"
 .PD
 .SH "AUTHOR"
 .IX Header "AUTHOR"
index e33777a8d4fb689e82a5213f2926805b0d3c0589..ab963dfce9e2c2e8617273e870b58680d61ae06d 100644 (file)
@@ -33,10 +33,13 @@ PREPACKAGED EXTENSIONS
 
     selection (enabled by default)
         (More) intelligent selection. This extension tries to be more
-        intelligent when the user extends selections (double-click). Right
-        now, it tries to select urls and complete shell-quoted arguments,
-        which is very convenient, too, if your ls supports
-        "--quoting-style=shell".
+        intelligent when the user extends selections (double-click and
+        further clicks). Right now, it tries to select words, urls and
+        complete shell-quoted arguments, which is very convenient, too, if
+        your ls supports "--quoting-style=shell".
+
+        A double-click usually selects the word under the cursor, further
+        clicks will enlarge the selection.
 
         It also offers the following bindable keyboard command:
 
@@ -57,21 +60,26 @@ PREPACKAGED EXTENSIONS
 
     searchable-scrollback<hotkey> (enabled by default)
         Adds regex search functionality to the scrollback buffer, triggered
-        by a hotkey (default: "M-s"). When in search mode, normal terminal
-        input/output is suspended.
-
-        "/" starts an incremental regex search, "n" searches further, "p" or
-        "N" jump to the previous match, "G" jumps to the bottom and clears
-        the history, "enter" leaves search mode at the current position and
-        "escape" returns to the original position.
+        by a hotkey (default: "M-s"). While in search mode, normal terminal
+        input/output is suspended and a regex is displayed at the bottom of
+        the screen.
+
+        Inputting characters appends them to the regex and continues
+        incremental search. "BackSpace" removes a character from the regex,
+        "Up" and "Down" search upwards/downwards in the scrollback buffer,
+        "End" jumps to the bottom. "Escape" leaves search mode and returns
+        to the point where search was started, while "Enter" or "Return"
+        stay at the current position and additionally stores the first match
+        in the current line into the primary selection.
 
     digital-clock
         Displays a digital clock using the built-in overlay.
 
     mark-urls
         Uses per-line display filtering ("on_line_update") to underline urls
-        and make them clickable. When clicked, the program specified in the
-        resource "urlLauncher" (default "x-www-browser") will be started.
+        and make them clickable. When middle-clicked, the program specified
+        in the resource "urlLauncher" (default "x-www-browser") will be
+        started with the URL as first argument.
 
     block-graphics-to-ascii
         A not very useful example of filtering all text output to the
@@ -189,7 +197,10 @@ API DOCUMENTATION
         Called whenever the user tries to extend the selection (e.g. with a
         double click) and is either supposed to return false (normal
         operation), or should extend the selection itelf and return true to
-        suppress the built-in processing.
+        suppress the built-in processing. This can happen multiple times, as
+        long as the callback returns true, it will be called on every
+        further click by the user and is supposed to enlarge the selection
+        more and more, if possible.
 
         See the selection example extension.
 
@@ -474,9 +485,17 @@ API DOCUMENTATION
         Return the current values of the selection mark, begin or end
         positions, and optionally set them to new values.
 
+    $term->selection_make ($eventtime[, $rectangular])
+        Tries to make a selection as set by "selection_beg" and
+        "selection_end". If $rectangular is true (default: false), a
+        rectangular selection will be made. This is the prefered function to
+        make a selection.
+
     $success = $term->selection_grab ($eventtime)
-        Try to request the primary selection from the server (for example,
-        as set by the next method).
+        Try to request the primary selection text from the server (for
+        example, as set by the next method). No visual feedback will be
+        given. This function is mostly useful from within "on_sel_grab"
+        hooks.
 
     $oldtext = $term->selection ([$newtext])
         Return the current selection text and optionally replace it by
@@ -531,15 +550,16 @@ API DOCUMENTATION
 
     $term->scr_xor_span ($beg_row, $beg_col, $end_row, $end_col[, $rstyle])
         XORs the rendition values in the given span with the provided value
-        (default: "RS_RVid"). Useful in refresh hooks to provide effects
-        similar to the selection.
+        (default: "RS_RVid"), which *MUST NOT* contain font styles. Useful
+        in refresh hooks to provide effects similar to the selection.
 
     $term->scr_xor_rect ($beg_row, $beg_col, $end_row, $end_col[, $rstyle1[,
     $rstyle2]])
         Similar to "scr_xor_span", but xors a rectangle instead. Trailing
         whitespace will additionally be xored with the $rstyle2, which
         defaults to "RS_RVid | RS_Uline", which removes reverse video again
-        and underlines it instead.
+        and underlines it instead. Both styles *MUST NOT* contain font
+        styles.
 
     $term->scr_bell
         Ring the bell!
@@ -689,7 +709,8 @@ API DOCUMENTATION
 
         $offset = $line->offset_of ($row, $col)
             Returns the character offset of the given row|col pair within
-            the logical line.
+            the logical line. Works for rows outside the line, too, and
+            returns corresponding offsets outside the string.
 
         ($row, $col) = $line->coord_of ($offset)
             Translates a string offset into terminal coordinates again.
@@ -829,7 +850,8 @@ ENVIRONMENT
 
     == 0 - fatal messages
     >= 3 - script loading and management
-    >=10 - all events received
+    >=10 - all called hooks
+    >=11 - hook reutrn values
 
 AUTHOR
      Marc Lehmann <pcg@goof.com>
index 4669f49267ff356a351bf8de0dc646b6c6d8a832..93d2f8d1baffcb18060fc0238dbff5d4be65e179 100644 (file)
@@ -121,7 +121,7 @@ sub key_press {
 
    delete $self->{manpage_overlay};
 
-   if ($keysym == 0xff0d || $keysym == 0xff8d) {
+   if ($keysym == 0xff0d || $keysym == 0xff8d) { # enter
       if ($self->{found}) {
          my ($br, $bc, $er, $ec) = @{ $self->{found}[0] };
          $self->selection_beg ($br, $bc);
@@ -129,31 +129,19 @@ sub key_press {
          $self->selection_make ($event->{time});
       }
       $self->leave;
-   } elsif ($keysym == 0xff1b) {
+   } elsif ($keysym == 0xff1b) { # escape
       $self->view_start ($self->{view_start});
       $self->leave;
-   } elsif ($keysym == 0xff57) {
+   } elsif ($keysym == 0xff57) { # end
       $self->{row} = $self->nrow - 1;
       $self->view_start (0);
-   } elsif ($keysym == 0xff52) {
+   } elsif ($keysym == 0xff52) { # up
       $self->{row}-- if $self->{row} > -$self->nsaved;
       $self->search (-1);
-   } elsif ($keysym == 0xff54) {
+   } elsif ($keysym == 0xff54) { # down
       $self->{row}++ if $self->{row} < $self->nrow;
       $self->search (+1);
-   } elsif ($string eq "n") {
-      if ($self->{found} && @{ $self->{found} }) {
-         push @{ $self->{history} }, [$self->view_start, $self->{found}];
-         $self->search (-1);
-         $self->idle;
-      }
-   } elsif ($string eq "p" or $string eq "N") {
-      if (my $prev = pop @{ $self->{history} }) {
-         $self->view_start ($prev->[0]);
-         $self->{found} = $prev->[1];
-         $self->want_refresh;
-      }
-   } elsif ($keysym == 0xff08) {
+   } elsif ($keysym == 0xff08) { # backspace
       substr $self->{search}, -1, 1, "";
       $self->search;
       $self->idle;
index da1896558d43a11aa43656a6c72d3c94b3c38457..04b95caabe970b089d70cd127654e99ae08aa8d3 100644 (file)
@@ -42,9 +42,13 @@ You can activate them like this:
 =item selection (enabled by default)
 
 (More) intelligent selection. This extension tries to be more intelligent
-when the user extends selections (double-click). Right now, it tries to
-select urls and complete shell-quoted arguments, which is very convenient,
-too, if your F<ls> supports C<--quoting-style=shell>.
+when the user extends selections (double-click and further clicks). Right
+now, it tries to select words, urls and complete shell-quoted
+arguments, which is very convenient, too, if your F<ls> supports
+C<--quoting-style=shell>.
+
+A double-click usually selects the word under the cursor, further clicks
+will enlarge the selection.
 
 It also offers the following bindable keyboard command:
 
@@ -72,13 +76,17 @@ evalution, web-browser starting etc.), depending on content.
 =item searchable-scrollback<hotkey> (enabled by default)
 
 Adds regex search functionality to the scrollback buffer, triggered
-by a hotkey (default: C<M-s>). When in search mode, normal terminal
-input/output is suspended.
-
-C</> starts an incremental regex search, C<n> searches further, C<p> or
-C<N> jump to the previous match, C<G> jumps to the bottom and clears the
-history, C<enter> leaves search mode at the current position and C<escape>
-returns to the original position.
+by a hotkey (default: C<M-s>). While in search mode, normal terminal
+input/output is suspended and a regex is displayed at the bottom of the
+screen.
+
+Inputting characters appends them to the regex and continues incremental
+search. C<BackSpace> removes a character from the regex, C<Up> and C<Down>
+search upwards/downwards in the scrollback buffer, C<End> jumps to the
+bottom. C<Escape> leaves search mode and returns to the point where search
+was started, while C<Enter> or C<Return> stay at the current position and
+additionally stores the first match in the current line into the primary
+selection.
 
 =item digital-clock
 
@@ -88,7 +96,8 @@ Displays a digital clock using the built-in overlay.
 
 Uses per-line display filtering (C<on_line_update>) to underline urls and
 make them clickable. When middle-clicked, the program specified in the
-resource C<urlLauncher> (default C<x-www-browser>) will be started.
+resource C<urlLauncher> (default C<x-www-browser>) will be started with
+the URL as first argument.
 
 =item block-graphics-to-ascii