On MSCROLL » History » Version 1
Per Amundsen, 12/08/2016 03:19 AM
1 | 1 | Per Amundsen | _Added in 2.7_ |
---|---|---|---|
2 | |||
3 | *<notextile>on <level>:MSCROLL:<*#?=!@>:<commands></notextile>* |
||
4 | |||
5 | Triggers when a user scrolls the message buffer in a window. |
||
6 | |||
7 | _See also [[$mscroll.pos]], [[$mscroll.max]]._ |
||
8 | |||
9 | *Parameters* |
||
10 | |||
11 | <level> - The level for the event to trigger. |
||
12 | <*#?=!@> - The [[Matchtarget]] to listen to. |
||
13 | <commands> - The commands to be performed when the event listener's criteria is met. |
||
14 | |||
15 | *Example* |
||
16 | |||
17 | <pre> |
||
18 | on *:mscroll:#:{ |
||
19 | if ($mscroll.pos == 1) { |
||
20 | echo -sg scrollbar for $active is at top |
||
21 | } |
||
22 | else if ($mscroll.pos == $mscroll.max) { |
||
23 | echo -sg scrollbar for $active is at bottom |
||
24 | } |
||
25 | } |
||
26 | </pre> |