partially fix tab display during searching
This commit is contained in:
parent
3636782b9b
commit
ae3b2c3051
14
femto.tal
14
femto.tal
|
@ -69,6 +69,7 @@
|
|||
( these can be changed at any time without breaking anything else )
|
||||
@config [
|
||||
&tab-width $2 ( how many spaces to display tab chars )
|
||||
&tab-adjust $2 ( how many "extra" spaces; tab-width - 1 )
|
||||
&insert-tabs $1 ( tab key inserts tabs when true )
|
||||
&color $2 ( digits of highlight color in reverse order )
|
||||
]
|
||||
|
@ -140,6 +141,7 @@
|
|||
#0050 .term/cols STZ2
|
||||
#0018 .term/rows STZ2
|
||||
#0004 .config/tab-width STZ2
|
||||
#0003 .config/tab-adjust STZ2
|
||||
#00 .config/insert-tabs STZ
|
||||
#3333 .config/color STZ2
|
||||
;data .buffer/offset STZ2
|
||||
|
@ -1247,6 +1249,7 @@
|
|||
DUP2 ORA ,&found JCN
|
||||
POP2 ( offset [-count] )
|
||||
LDAk #0a EQU ,&newline JCN
|
||||
,&count-tabs JSR
|
||||
#0001 ,&next JMP ( offset n [-count] )
|
||||
&found ( offset mlim [-count] )
|
||||
STH2k ( offset mlim [mlim -count] )
|
||||
|
@ -1270,6 +1273,10 @@
|
|||
&return
|
||||
JMP2r
|
||||
[ &x $2 &y $2 ]
|
||||
&count-tabs ( offset -> offset )
|
||||
LDAk #09 NEQ ,&count-tabs/done JCN
|
||||
,&x LDR2 .config/tab-adjust LDZ2 ADD2 ,&x STR2
|
||||
&count-tabs/done JMP2r
|
||||
|
||||
@emit-tab ( -> )
|
||||
#0000 .config/tab-width LDZ2 SUB2
|
||||
|
@ -1440,12 +1447,17 @@
|
|||
&loop ( s pos )
|
||||
GTH2k #00 EQU ,&done JCN
|
||||
LDAk #0a EQU ,&newline JCN
|
||||
,&col LDR2 INC2 ,&col STR2
|
||||
LDAk #09 EQU ,&tab JCN
|
||||
#0001
|
||||
&inc
|
||||
,&col LDR2 ADD2 ,&col STR2
|
||||
INC2 ,&loop JMP
|
||||
&newline
|
||||
#0000 ,&col STR2
|
||||
,&row LDR2 INC2 ,&row STR2
|
||||
INC2 ,&loop JMP
|
||||
&tab
|
||||
.config/tab-width LDZ2 ,&inc JMP
|
||||
&done
|
||||
POP2 POP2
|
||||
,&row LDR2 ,&col LDR2 JMP2r
|
||||
|
|
Loading…
Reference in New Issue