From ee9a63a1540e77c6880d5df3b71c7c5ce578a09a Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 27 May 2024 20:25:39 -0700 Subject: [PATCH] Tab tabbed following lines --- gui/notepad/src/notepad.tal | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gui/notepad/src/notepad.tal b/gui/notepad/src/notepad.tal index a6020b2..ce88183 100644 --- a/gui/notepad/src/notepad.tal +++ b/gui/notepad/src/notepad.tal @@ -496,7 +496,10 @@ JMP2r ( wrap ) LDAk #20 GTH ?&no-wrap DUP2 word-width .Screen/x DEI2 ADD2 #00d0 LTH2 ?&no-wrap - #01 !draw-linebreak + ( tabbed ) + DUP2 find-line-start LDA2 #093e NEQ2 ?{ + #01 #0021 !draw-linebreak } + #01 #0008 !draw-linebreak &no-wrap ( char ) LDAk char-width .Screen/x DEI2 ADD2 @@ -507,7 +510,7 @@ JMP2r &no-tab ( linebreak ) LDAk #0a NEQ ?&no-lb - #01 !draw-linebreak + #01 #0008 !draw-linebreak &no-lb #00 @@ -555,7 +558,8 @@ JMP2r ;mem SWP2 &l - #0001 SUB2 LDAk #0a EQU ?&end + #0001 SUB2 LDAk + DUP #0a EQU SWP #00 EQU ORA ?&end LTH2k ?&l &end NIP2 INC2 @@ -567,6 +571,7 @@ JMP2r get-eof SWP2 &l LDAk #0a EQU ?&end + LDAk #00 EQU ?&end INC2 GTH2k ?&l &end NIP2 @@ -700,9 +705,9 @@ JMP2r JMP2r -@draw-linebreak ( -- ) +@draw-linebreak ( x* -- ) - #0008 .Screen/x DEO2 + .Screen/x DEO2 .Screen/y DEI2k #0010 ADD2 ROT DEO2 JMP2r