… | |
… | |
2 | |
2 | |
3 | #:META:X_RESOURCE:url-launcher:string:shell command to use |
3 | #:META:X_RESOURCE:url-launcher:string:shell command to use |
4 | |
4 | |
5 | =head1 NAME |
5 | =head1 NAME |
6 | |
6 | |
7 | selection-popup (enabled by default) |
7 | selection-popup (enabled by default) |
8 | |
8 | |
9 | =head1 DESCRIPTION |
9 | =head1 DESCRIPTION |
10 | |
10 | |
11 | Binds a popup menu to Ctrl-Button3 that lets you convert the selection |
11 | Binds a popup menu to Ctrl-Button3 that lets you convert the selection |
12 | text into various other formats/action (such as uri unescaping, perl |
12 | text into various other formats/action (such as uri unescaping, perl |
13 | evaluation, web-browser starting etc.), depending on content. |
13 | evaluation, web-browser starting etc.), depending on content. |
14 | |
14 | |
15 | Other extensions can extend this popup menu by pushing a code reference |
15 | Other extensions can extend this popup menu by pushing a code reference |
16 | onto C<@{ $term->{selection_popup_hook} }>, which gets called whenever the |
16 | onto C<< @{ $term->{selection_popup_hook} } >>, which gets called whenever |
17 | popup is being displayed. |
17 | the popup is being displayed. |
18 | |
18 | |
19 | Its sole argument is the popup menu, which can be modified. The selection |
19 | Its sole argument is the popup menu, which can be modified. The selection |
20 | is in C<$_>, which can be used to decide whether to add something or not. |
20 | is in C<$_>, which can be used to decide whether to add something or not. |
21 | It should either return nothing or a string and a code reference. The |
21 | It should either return nothing or a string and a code reference. The |
22 | string will be used as button text and the code reference will be called |
22 | string will be used as button text and the code reference will be called |