ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/urxvt.pm
(Generate patch)

Comparing rxvt-unicode/src/urxvt.pm (file contents):
Revision 1.109 by root, Thu Jan 19 16:07:09 2006 UTC vs.
Revision 1.110 by root, Thu Jan 19 16:22:13 2006 UTC

89 89
90Binds a popup menu to Ctrl-Button3 that lets you convert the selection 90Binds a popup menu to Ctrl-Button3 that lets you convert the selection
91text into various other formats/action (such as uri unescaping, perl 91text into various other formats/action (such as uri unescaping, perl
92evalution, web-browser starting etc.), depending on content. 92evalution, web-browser starting etc.), depending on content.
93 93
94Other extensions can extend this popup menu by pushing a code reference onto 94Other extensions can extend this popup menu by pushing a code reference
95C<@urxvt::ext::selection_popup::hook>, that is called whenever the popup is displayed. 95onto C<@{ $term->{selection_popup_hook} }>, that is called whenever the
96popup is displayed.
96 97
97It's sole argument is the popup menu, which can be modified. The selection 98It's sole argument is the popup menu, which can be modified. The selection
98is in C<$_>, which can be used to decide wether to add something or not. 99is in C<$_>, which can be used to decide wether to add something or not.
99It should either return nothing or a string and a code reference. The 100It should either return nothing or a string and a code reference. The
100string will be used as button text and the code reference will be called 101string will be used as button text and the code reference will be called
102 103
103The following will add an entry C<a to b> that transforms all C<a>s in 104The following will add an entry C<a to b> that transforms all C<a>s in
104the selection to C<b>s, but only if the selection currently contains any 105the selection to C<b>s, but only if the selection currently contains any
105C<a>s: 106C<a>s:
106 107
107 push urxvt::ext::selection_popup::hook, sub { 108 push @{ $self->{term}{selection_popup_hook} }, sub {
108 /a/ ? ("a to be" => sub { s/a/b/g } 109 /a/ ? ("a to be" => sub { s/a/b/g }
109 : () 110 : ()
110 }; 111 };
111
112Don't run it in a hook, otherwise the menu will grow and grow. Instead put
113it at the toplevel of your extension.
114 112
115=item searchable-scrollback<hotkey> (enabled by default) 113=item searchable-scrollback<hotkey> (enabled by default)
116 114
117Adds regex search functionality to the scrollback buffer, triggered 115Adds regex search functionality to the scrollback buffer, triggered
118by a hotkey (default: C<M-s>). While in search mode, normal terminal 116by a hotkey (default: C<M-s>). While in search mode, normal terminal

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines