… | |
… | |
493 | |
493 | |
494 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
494 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
495 | $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total |
495 | $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total |
496 | number of lines that will be in the scrollback buffer. |
496 | number of lines that will be in the scrollback buffer. |
497 | |
497 | |
|
|
498 | =item on_osc_seq $term, $op, $args |
|
|
499 | |
|
|
500 | Called on every OSC sequence and can be used to suppress it or modify its |
|
|
501 | behaviour. The default should be to return an empty list. A true value |
|
|
502 | suppresses execution of the request completely. Make sure you don't get |
|
|
503 | confused by recursive invocations when you output an osc sequence within |
|
|
504 | this callback. |
|
|
505 | |
|
|
506 | C<on_osc_seq_perl> should be used for new behaviour. |
|
|
507 | |
498 | =item on_osc_seq $term, $string |
508 | =item on_osc_seq_perl $term, $string |
499 | |
509 | |
500 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
510 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
501 | operating system command) is processed. Cursor position and other state |
511 | operating system command) is processed. Cursor position and other state |
502 | information is up-to-date when this happens. For interoperability, the |
512 | information is up-to-date when this happens. For interoperability, the |
503 | string should start with the extension name and a colon, to distinguish |
513 | string should start with the extension name and a colon, to distinguish |
… | |
… | |
897 | |
907 | |
898 | if (my $cb = $TERM->{_hook}[$htype]) { |
908 | if (my $cb = $TERM->{_hook}[$htype]) { |
899 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
909 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
900 | if $verbosity >= 10; |
910 | if $verbosity >= 10; |
901 | |
911 | |
902 | keys %$cb; |
912 | for my $pkg (keys %$cb) { |
903 | |
|
|
904 | while (my ($pkg, $cb) = each %$cb) { |
|
|
905 | my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; |
913 | my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) }; |
906 | $retval ||= $retval_; |
914 | $retval ||= $retval_; |
907 | |
915 | |
908 | if ($@) { |
916 | if ($@) { |
909 | $TERM->ungrab; # better to lose the grab than the session |
917 | $TERM->ungrab; # better to lose the grab than the session |
910 | warn $@; |
918 | warn $@; |