fix some bugs
This commit is contained in:
parent
7fce584588
commit
ed20ad7865
13
femto.tal
13
femto.tal
|
@ -440,6 +440,7 @@
|
|||
&noop JMP2r
|
||||
|
||||
@refresh
|
||||
;rel-line-error ;error! JMP2 ( FIXME )
|
||||
;draw-all JSR2 BRK
|
||||
|
||||
@debug
|
||||
|
@ -522,6 +523,9 @@
|
|||
|
||||
@draw-cursor ( -> )
|
||||
;cur-w-col JSR2 .term/lmargin LDZ2 ADD2
|
||||
DUP2 .term/cols LDZ2 LTH2 ,&ok JCN
|
||||
( TODO: handle long line here )
|
||||
&ok
|
||||
;cur-rel-row JSR2
|
||||
;term-move-cursor JMP2
|
||||
|
||||
|
@ -546,7 +550,7 @@
|
|||
;messages/lines ;print JSR2
|
||||
#20 emit
|
||||
LIT '( emit
|
||||
;cur-col JSR2 INC ;emit-dec JSR2
|
||||
;cur-col JSR2 INC2 ;emit-dec2 JSR2
|
||||
LIT ', emit
|
||||
;cur-abs-row JSR2 INC2 ;emit-dec2 JSR2
|
||||
LIT ') emit
|
||||
|
@ -586,9 +590,6 @@
|
|||
&bol
|
||||
ADD2kr STH2r ;draw-linenum JSR2
|
||||
.term/lmargin LDZ2 INC2 ,&x STR2
|
||||
( TODO: use this for cursor-line highlighting and long line support )
|
||||
( STH2kr .cursor/row LDZ2 INC2 NEQ2 ,&loop JCN
|
||||
;emit-color-reverse JSR2 )
|
||||
&loop ( offset [k line-offset] )
|
||||
LDAk #00 EQU ,&eof JCN
|
||||
LDAk #0a EQU ,&eol JCN
|
||||
|
@ -759,10 +760,10 @@
|
|||
JMP2r
|
||||
|
||||
@inc-row ( -> )
|
||||
.cursor/row LDZ2k INC2 SWP2 STA2 JMP2r
|
||||
.cursor/row LDZ2 INC2 .cursor/row STZ2 JMP2r
|
||||
|
||||
@dec-row ( -> )
|
||||
.cursor/row LDZ2k #0001 SUB2 SWP2 STA2
|
||||
.cursor/row LDZ2 #0001 SUB2 .cursor/row STZ2 JMP2r
|
||||
|
||||
@last-pos ( -> addr* )
|
||||
.buffer/limit LDZ2 #0001 SUB2 JMP2r
|
||||
|
|
Loading…
Reference in New Issue