*** empty log message ***
authorroot <root>
Thu, 19 Jan 2006 21:02:06 +0000 (21:02 +0000)
committerroot <root>
Thu, 19 Jan 2006 21:02:06 +0000 (21:02 +0000)
src/perl/selection-popup
src/urxvt.pm

index d5db95dcb9fa626831f20955d8280b7f4cc2f8de..2db8a90c33a7babb4dd870048fb3b47803a77740 100644 (file)
@@ -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/ });
index 521e9ae6b398e0181e8e0ecf9f1deb8dacf9aa8a..6b7aeaf5c27563b99d5169ce23a81b3c1e99ce21 100644 (file)
@@ -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<Extension Objects> section.
 
-B<All> of these hooks must return a boolean value. If it is true, then the
-event counts as being I<consumed>, and the invocation of other hooks is
-skipped, and the relevant action might not be carried out by the C++ code.
+B<All> of these hooks must return a boolean value. If any of the called
+hooks returns true, then the event counts as being I<consumed>, 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<on_start> 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 C<fork>ed.
@@ -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