… | |
… | |
230 | =item on_sel_extend $term |
230 | =item on_sel_extend $term |
231 | |
231 | |
232 | Called whenever the user tries to extend the selection (e.g. with a double |
232 | Called whenever the user tries to extend the selection (e.g. with a double |
233 | click) and is either supposed to return false (normal operation), or |
233 | click) and is either supposed to return false (normal operation), or |
234 | should extend the selection itelf and return true to suppress the built-in |
234 | should extend the selection itelf and return true to suppress the built-in |
235 | processing. |
235 | processing. This can happen multiple times, as long as the callback |
|
|
236 | returns true, it will be called on every further click by the user and is |
|
|
237 | supposed to enlarge the selection more and more, if possible. |
236 | |
238 | |
237 | See the F<selection> example extension. |
239 | See the F<selection> example extension. |
238 | |
240 | |
239 | =item on_view_change $term, $offset |
241 | =item on_view_change $term, $offset |
240 | |
242 | |
… | |
… | |
595 | if ($@) { |
597 | if ($@) { |
596 | $TERM->ungrab; # better to lose the grab than the session |
598 | $TERM->ungrab; # better to lose the grab than the session |
597 | warn $@; |
599 | warn $@; |
598 | } |
600 | } |
599 | } |
601 | } |
|
|
602 | |
|
|
603 | verbose 11, "$HOOKNAME[$htype] returning <$retval>" |
|
|
604 | if $verbosity >= 11; |
600 | } |
605 | } |
601 | |
606 | |
602 | if ($htype == 1) { # DESTROY |
607 | if ($htype == 1) { # DESTROY |
603 | if (my $hook = delete $TERM->{_hook}) { |
608 | if (my $hook = delete $TERM->{_hook}) { |
604 | for my $htype (0..$#$hook) { |
609 | for my $htype (0..$#$hook) { |
… | |
… | |
1218 | Return the row number of the first/last row of the line, respectively. |
1223 | Return the row number of the first/last row of the line, respectively. |
1219 | |
1224 | |
1220 | =item $offset = $line->offset_of ($row, $col) |
1225 | =item $offset = $line->offset_of ($row, $col) |
1221 | |
1226 | |
1222 | Returns the character offset of the given row|col pair within the logical |
1227 | Returns the character offset of the given row|col pair within the logical |
1223 | line. |
1228 | line. Works for rows outside the line, too, and returns corresponding |
|
|
1229 | offsets outside the string. |
1224 | |
1230 | |
1225 | =item ($row, $col) = $line->coord_of ($offset) |
1231 | =item ($row, $col) = $line->coord_of ($offset) |
1226 | |
1232 | |
1227 | Translates a string offset into terminal coordinates again. |
1233 | Translates a string offset into terminal coordinates again. |
1228 | |
1234 | |
… | |
… | |
1583 | |
1589 | |
1584 | =item == 0 - fatal messages |
1590 | =item == 0 - fatal messages |
1585 | |
1591 | |
1586 | =item >= 3 - script loading and management |
1592 | =item >= 3 - script loading and management |
1587 | |
1593 | |
1588 | =item >=10 - all events received |
1594 | =item >=10 - all called hooks |
|
|
1595 | |
|
|
1596 | =item >=11 - hook reutrn values |
1589 | |
1597 | |
1590 | =back |
1598 | =back |
1591 | |
1599 | |
1592 | =head1 AUTHOR |
1600 | =head1 AUTHOR |
1593 | |
1601 | |