--- rxvt-unicode/src/perl/selection 2014/04/26 20:51:12 1.57 +++ rxvt-unicode/src/perl/selection 2014/05/17 15:48:29 1.59 @@ -1,6 +1,6 @@ #! perl -#:META:X_RESOURCE:%.pattern-0:string:first selection pattern +#:META:RESOURCE:%.pattern-0:string:first selection pattern =head1 NAME @@ -55,19 +55,15 @@ =cut -sub on_user_command { - my ($self, $cmd) = @_; +sub on_action { + my ($self, $action) = @_; - $cmd eq "selection:rot13" + $action eq "rot13" and $self->selection (map { y/A-Za-z/N-ZA-Mn-za-m/; $_ } $self->selection); () } -sub on_keyboard_dispatch { - &on_user_command; -} - sub on_init { my ($self) = @_;