ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/searchable-scrollback
(Generate patch)

Comparing rxvt-unicode/src/perl/searchable-scrollback (file contents):
Revision 1.32 by root, Sat May 17 13:38:23 2014 UTC vs.
Revision 1.33 by root, Sat May 17 15:25:04 2014 UTC

1#! perl 1#! perl
2 2
3# this extension implements scrollback buffer search 3# this extension implements scrollback buffer search
4 4
5#:META:RESOURCE:%:string:activation hotkey keysym 5#:META:RESOURCE:%:string:activation hotkey keysym
6#:META:KEYSYM:M-s:searchable-scrollback:start 6#:META:BINDING:M-s:start
7 7
8=head1 NAME 8=head1 NAME
9 9
10searchable-scrollback<hotkey> - incremental scrollback search (enabled by default) 10searchable-scrollback<hotkey> - incremental scrollback search (enabled by default)
11 11
33=cut 33=cut
34 34
35sub on_init { 35sub on_init {
36 my ($self) = @_; 36 my ($self) = @_;
37 37
38 # only for backwards compatibility
38 my $hotkey = $self->{argv}[0] 39 my $hotkey = $self->{argv}[0]
39 || $self->x_resource ("%") 40 || $self->x_resource ("%")
40 || "M-s"; 41 || "M-s";
41 42
42 $self->parse_keysym ($hotkey, "perl:searchable-scrollback:start") 43 $self->bind_action ($hotkey, "searchable-scrollback:start") # ugh
43 or warn "unable to register '$hotkey' as scrollback search start hotkey\n"; 44 or warn "unable to register '$hotkey' as scrollback search start hotkey\n";
44 45
45 () 46 ()
46} 47}
47 48
48sub on_user_command { 49sub on_action {
49 my ($self, $cmd) = @_; 50 my ($self, $action) = @_;
50 51
51 $cmd eq "searchable-scrollback:start" 52 $action eq "start"
52 and $self->enter; 53 and $self->enter;
53 54
54 () 55 ()
55} 56}
56 57

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines