From: root Date: Thu, 19 Jan 2006 21:02:06 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=0d29454ab9cb44a323905f9934ebcab76c43a78b;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/perl/selection-popup b/src/perl/selection-popup index d5db95dc..2db8a90c 100644 --- a/src/perl/selection-popup +++ b/src/perl/selection-popup @@ -56,8 +56,11 @@ sub on_button_press { }; for ($text) { - $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); - $add_button->("eval perl expression" => sub { no warnings; $_ = eval $_ }); + /./ + and $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); + + /./ + and $add_button->("eval perl expression" => sub { no warnings; $_ = eval $_ }); /^(\S+):(\d+):?$/ and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ }); diff --git a/src/urxvt.pm b/src/urxvt.pm index 521e9ae6..6b7aeaf5 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -305,9 +305,9 @@ called whenever the relevant event happens. The first argument passed to them is an extension oject as described in the in the C section. -B of these hooks must return a boolean value. If it is true, then the -event counts as being I, and the invocation of other hooks is -skipped, and the relevant action might not be carried out by the C++ code. +B of these hooks must return a boolean value. If any of the called +hooks returns true, then the event counts as being I, and the +relevant action might not be carried out by the C++ code. I<< When in doubt, return a false value (preferably C<()>). >> @@ -318,8 +318,14 @@ I<< When in doubt, return a false value (preferably C<()>). >> Called after a new terminal object has been initialized, but before windows are created or the command gets run. Most methods are unsafe to call or deliver senseless data, as terminal size and other characteristics -have not yet been determined. You can safely query and change resources, -though. +have not yet been determined. You can safely query and change resources +and options, though. For many purposes the C hook is a better +place. + +=item on_start $term + +Called at the very end of initialisation of a new terminal, just before +returning to the mainloop. =item on_reset $term @@ -327,11 +333,6 @@ Called after the screen is "reset" for any reason, such as resizing or control sequences. Here is where you can react on changes to size-related variables. -=item on_start $term - -Called at the very end of initialisation of a new terminal, just before -returning to the mainloop. - =item on_child_start $term, $pid Called just after the child process has been Ced. @@ -736,8 +737,7 @@ sub invoke { keys %$cb; while (my ($pkg, $cb) = each %$cb) { - $retval = eval { $cb->($TERM->{_pkg}{$pkg}, @_) } - and last; + $retval ||= eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; if ($@) { $TERM->ungrab; # better to lose the grab than the session