diff --git a/gui/notepad/notepad.tal b/gui/notepad/notepad.tal index 102d025..041b73d 100644 --- a/gui/notepad/notepad.tal +++ b/gui/notepad/notepad.tal @@ -45,6 +45,7 @@ BRK @on-mouse-head ( -> ) [ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;mouse-icn update-cursor + .Mouse/state DEI #01 GTH ?&toggle-collapse trap-mouse @@ -61,10 +62,25 @@ BRK BRK +&toggle-collapse ( -> ) + + #00e0 .Screen/width DEO2 + + #00f8 #0011 + #0011 .Screen/height DEI2 EQU2 JMP SWP2 POP2 + .Screen/height DEO2 + draw-header + redraw + #00 .Mouse/state DEO + +BRK + @on-mouse-body ( -> ) [ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;caret-icn update-cursor + trap-mouse + [ LIT &last $1 ] .Mouse/state DEI DUP2 #0001 NEQ2 ?&no-down get-position select-from @@ -281,6 +297,9 @@ JMP2r @draw-footer ( -- ) + .Screen/height DEI2 #0020 GTH2 ?&visible + JMP2r + &visible #26 .Screen/auto DEO #0000 .Screen/x DEO2 .Screen/height DEI2 #0020 SUB2 .Screen/y DEO2