From cb01ffa8c3d27b8d251e278a36f88e0b48253bc4 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 28 May 2024 20:19:44 -0700 Subject: [PATCH] Indent line starting with bullet or caret --- gui/notepad/src/notepad.tal | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gui/notepad/src/notepad.tal b/gui/notepad/src/notepad.tal index 1930b03..983395d 100644 --- a/gui/notepad/src/notepad.tal +++ b/gui/notepad/src/notepad.tal @@ -327,8 +327,12 @@ LDAk #20 GTH ?&no-wrap DUP2 word-width .Screen/x DEI2 ADD2 #00d0 LTH2 ?&no-wrap ( | tabbed ) - DUP2 find-line-start LDA2 DUP2 #093e NEQ2 ?{ POP2 #01 #0021 ! } - DUP2 #092d NEQ2 ?{ POP2 #01 #0022 ! } + DUP2 find-line-start + ( tab line ) LDA2k #093e NEQ2 ?{ POP2 #01 #0021 ! } + ( tab caret ) LDA2k #092d NEQ2 ?{ POP2 #01 #0022 ! } + #0001 SUB2 + ( lb line ) LDA2k #0a3e NEQ2 ?{ POP2 #01 #0011 ! } + ( lb caret ) LDA2k #0a2d NEQ2 ?{ POP2 #01 #0012 ! } POP2 #01 #0008 ! &no-wrap ( char ) LDAk char-width .Screen/x DEI2 ADD2 .Screen/x DEO2 @@ -344,9 +348,10 @@ @char-addr ( prev char -- addr* ) DUP #7e GTH ?&missing DUP #20 LTH ?&blank - DUP2 #0a3e EQU2 ?&marker DUP2 #093e EQU2 ?&marker DUP2 #092d EQU2 ?&bullet + DUP2 #0a3e EQU2 ?&marker + DUP2 #0a2d EQU2 ?&bullet NIP #20 SUB #00 SWP #50 SFT2 ;font/glyphs ADD2 JMP2r &blank POP2 ;font/glyphs JMP2r &missing POP2 ;error-icn JMP2r