--- rxvt-unicode/src/urxvt.pm 2006/02/11 02:31:13 1.134 +++ rxvt-unicode/src/urxvt.pm 2006/07/03 19:11:41 1.141 @@ -155,8 +155,8 @@ =item readline (enabled by default) -A support package that tries to make editing with readline easier. At the -moment, it reacts to clicking with the left mouse button by trying to +A support package that tries to make editing with readline easier. At +the moment, it reacts to clicking shift-left mouse button by trying to move the text cursor to this position. It does so by generating as many cursor-left or cursor-right keypresses as required (the this only works for programs that correctly support wide characters). @@ -257,15 +257,16 @@ =item automove-background -This is basically a one-line extension that dynamically changes the background pixmap offset -to the window position, in effect creating the same effect as pseudo transparency with -a custom pixmap. No scaling is supported in this mode. Exmaple: +This is basically a very small extension that dynamically changes the +background pixmap offset to the window position, in effect creating the +same effect as pseudo transparency with a custom pixmap. No scaling is +supported in this mode. Exmaple: @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background =item block-graphics-to-ascii -A not very useful example of filtering all text output to the terminal, +A not very useful example of filtering all text output to the terminal by replacing all line-drawing characters (U+2500 .. U+259F) by a similar-looking ascii character. @@ -370,7 +371,7 @@ =head2 Extension Objects -Very perl extension is a perl class. A separate perl object is created +Every perl extension is a perl class. A separate perl object is created for each terminal and each extension and passed as the first parameter to hooks. So extensions can use their C<$self> object without having to think about other extensions, with the exception of methods and members that @@ -495,7 +496,17 @@ $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total number of lines that will be in the scrollback buffer. -=item on_osc_seq $term, $string +=item on_osc_seq $term, $op, $args + +Called on every OSC sequence and can be used to suppress it or modify its +behaviour. The default should be to return an empty list. A true value +suppresses execution of the request completely. Make sure you don't get +confused by recursive invocations when you output an osc sequence within +this callback. + +C should be used for new behaviour. + +=item on_osc_seq_perl $term, $string Called whenever the B command sequence (OSC = operating system command) is processed. Cursor position and other state @@ -899,10 +910,8 @@ verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" if $verbosity >= 10; - keys %$cb; - - while (my ($pkg, $cb) = each %$cb) { - my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; + for my $pkg (keys %$cb) { + my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) }; $retval ||= $retval_; if ($@) { @@ -1476,14 +1485,19 @@ Returns a copy of the environment in effect for the terminal as a hashref similar to C<\%ENV>. +=item @envv = $term->envv + +Returns the environment as array of strings of the form C. + +=item @argv = $term->argv + +Return the argument vector as this terminal, similar to @ARGV, but +includes the program name as first element. + =cut sub env { - if (my $env = $_[0]->_env) { - +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } - } else { - +{ %ENV } - } + +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv } } =item $modifiermask = $term->ModLevel3Mask