~ubuntu-branches/ubuntu/utopic/rxvt-unicode/utopic-proposed

« back to all changes in this revision

Viewing changes to src/perl/searchable-scrollback

  • Committer: Package Import Robot
  • Author(s): Ryan Kavanagh
  • Date: 2013-05-26 18:12:22 UTC
  • mfrom: (33.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130526181222-67glcv7nppi4ih7r
Tags: 9.18-2
* Upload to unstable now that wheezy has been released
* Merge in patch from gregor herrman fixing a FTBFS due to POD errors
  (Closes: #708026)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
# this extension implements scrollback buffer search
4
4
 
 
5
#:META:X_RESOURCE:%:string:activation hotkey keysym
 
6
 
 
7
=head1 NAME
 
8
 
 
9
searchable-scrollback<hotkey> - incremental scrollback search (enabled by default)
 
10
 
 
11
=head1 DESCRIPTION
 
12
 
 
13
Adds regex search functionality to the scrollback buffer, triggered
 
14
by a hotkey (default: C<M-s>). While in search mode, normal terminal
 
15
input/output is suspended and a regex is displayed at the bottom of the
 
16
screen.
 
17
 
 
18
Inputting characters appends them to the regex and continues incremental
 
19
search. C<BackSpace> removes a character from the regex, C<Up> and C<Down>
 
20
search upwards/downwards in the scrollback buffer, C<End> jumps to the
 
21
bottom. C<Escape> leaves search mode and returns to the point where search
 
22
was started, while C<Enter> or C<Return> stay at the current position and
 
23
additionally stores the first match in the current line into the primary
 
24
selection if the C<Shift> modifier is active.
 
25
 
 
26
The regex defaults to "(?i)", resulting in a case-insensitive search. To
 
27
get a case-sensitive search you can delete this prefix using C<BackSpace>
 
28
or simply use an uppercase character which removes the "(?i)" prefix.
 
29
 
 
30
See L<perlre> for more info about perl regular expression syntax.
 
31
 
 
32
=cut
 
33
 
5
34
sub on_init {
6
35
   my ($self) = @_;
7
36
 
8
37
   my $hotkey = $self->{argv}[0]
9
 
                || $self->x_resource ("searchable-scrollback")
 
38
                || $self->x_resource ("%")
10
39
                || "M-s";
11
40
 
12
41
   $self->parse_keysym ($hotkey, "perl:searchable-scrollback:start")