mirror of https://git.sr.ht/~rabbits/left
Housekeeping
This commit is contained in:
parent
a162201062
commit
474bf75675
18
src/left.tal
18
src/left.tal
|
@ -11,7 +11,7 @@
|
|||
@filepath $2f &end $1
|
||||
@search $30
|
||||
@selection &a $2 &b $2
|
||||
@textarea &highlight $1 &lines $2 &length $2
|
||||
@textarea &highlight $1 &length $2
|
||||
@scroll &x $2 &y $2 &addr $2 &ratio $2
|
||||
@scrollbar &height $2
|
||||
@state &comment $1 &underline $1 &label $1 &mono $1 &rune $1
|
||||
|
@ -33,7 +33,7 @@
|
|||
.filepath LDZ ?&soft
|
||||
( | cache position )
|
||||
.Screen/height DEI2 #0028 SUB2
|
||||
( ) DUP2 #04 SFT2 .textarea/lines STZ2
|
||||
( ) DUP2 #04 SFT2 ;scroll-follow/lines STA2
|
||||
( ) .scrollbar/height STZ2
|
||||
( | defaults )
|
||||
#0001 .scroll/ratio STZ2
|
||||
|
@ -646,7 +646,7 @@
|
|||
|
||||
@scroll-follow ( -- )
|
||||
get-to addr-to-line .scroll/y LDZ2 LTH2k ?&move
|
||||
.textarea/lines LDZ2 ADD2 GTH2k ?&move
|
||||
[ LIT2 &lines $2 ] ADD2 GTH2k ?&move
|
||||
POP2 POP2 JMP2r
|
||||
&move ( target* scroll/y* -- )
|
||||
POP2 !<set-scroll-y>
|
||||
|
@ -806,8 +806,8 @@
|
|||
INC2 !walk-blank
|
||||
|
||||
@walk-word ( addr* -- addr* )
|
||||
LDAk #20 GTH ?{ JMP2r }
|
||||
INC2 !walk-word
|
||||
INC2 & LDAk #20 GTH ?walk-word
|
||||
JMP2r
|
||||
|
||||
@scan-state ( addr* -- addr* )
|
||||
.textarea/highlight LDZ ?&skip
|
||||
|
@ -880,9 +880,9 @@
|
|||
LDAk #00 SWP ;font ADD2 LDA #00 SWP JMP2r
|
||||
|
||||
@get-glyph-width ( addr* -- addr* width* )
|
||||
.state/rune LDZ ?&rune
|
||||
.state/mono LDZ ?&fixed
|
||||
LDAk #7f GTH ?get-high-width
|
||||
.state/rune LDZ ?&rune
|
||||
LDAk #00 SWP ;font ADD2 LDA #00 SWP JMP2r
|
||||
&tab #0010 JMP2r
|
||||
&fixed LDAk #09 EQU ?&tab
|
||||
|
@ -919,8 +919,8 @@
|
|||
@get-glyph-addr ( addr* -- addr* glyph* )
|
||||
LDAk #20 LTH ?get-ctrl-addr
|
||||
LDAk #7f GTH ?get-high-addr
|
||||
.state/mono LDZ ?get-mono-addr
|
||||
.state/rune LDZ ?&rune
|
||||
.state/mono LDZ ?get-mono-addr
|
||||
LDAk #20 SUB #00 SWP #50 SFT2 ;font/glyphs ADD2 JMP2r
|
||||
&rune ( -- glyph* )
|
||||
get-rune #40 SFT2 ;rune-icns ADD2 JMP2r
|
||||
|
@ -1247,7 +1247,7 @@
|
|||
,&x STR2
|
||||
&>w ( -- )
|
||||
.Screen/x DEI2 [ LIT2 &x $2 ] LTH2 ?{
|
||||
walk-word
|
||||
walk-word/
|
||||
( ) #0006 ;dotdot-icn !<draw-short-glyph> }
|
||||
draw-glyph next-glyph LDAk #20 GTH ?&>w
|
||||
JMP2r
|
||||
|
@ -1426,7 +1426,7 @@
|
|||
( ) LDAk [ LIT "@ ] EQU ?{ draw-sym-field }
|
||||
<draw-sym-fill>
|
||||
walk-blank !&>l }
|
||||
walk-word }
|
||||
walk-word/ }
|
||||
INC2 !&>l
|
||||
|
||||
@<draw-sym-frame> ( flip -- )
|
||||
|
|
Loading…
Reference in New Issue