diff --git a/gui/notepad/notepad.tal b/gui/notepad/notepad.tal index c1bc320..9c83797 100644 --- a/gui/notepad/notepad.tal +++ b/gui/notepad/notepad.tal @@ -293,11 +293,14 @@ JMP2r #0018 .Screen/y DEO2 ;mem &while + LDAk #0a NEQ ?&no-lb + draw-linebreak + INC2 LDAk walk-on AND ?&while JMP2r + &no-lb ( wrap ) LDAk #20 NEQ ?&no-wrap DUP2 word-length .Screen/x DEI2 ADD2 #00d0 LTH2 ?&no-wrap - #0008 .Screen/x DEO2 - .Screen/y DEI2k #0010 ADD2 ROT DEO2 + draw-linebreak INC2 LDAk walk-on AND ?&while JMP2r &no-wrap LDAk #20 SUB #00 SWP ;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2 @@ -383,11 +386,14 @@ JMP2r #15 .Screen/auto DEO &while + LDAk #0a NEQ ?&no-lb + draw-linebreak + INC2 LDAk walk-on AND ?&while JMP2r + &no-lb ( wrap ) LDAk #20 NEQ ?&no-wrap DUP2 word-length .Screen/x DEI2 ADD2 #00d0 LTH2 ?&no-wrap - #0008 .Screen/x DEO2 - .Screen/y DEI2k #0010 ADD2 ROT DEO2 + draw-linebreak INC2 LDAk ?&while &no-wrap @@ -440,6 +446,13 @@ JMP2r JMP2r +@draw-linebreak ( -- ) + + #0008 .Screen/x DEO2 + .Screen/y DEI2k #0010 ADD2 ROT DEO2 + +JMP2r + @is-selected ( addr* -- f ) DUP2 .selection/from LDZ2 LTH2 ?&false