1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-02 08:30:55 +11:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Virgil Dupras
be66d7b4a2 editor: implement E 2020-05-07 08:44:17 -04:00
Virgil Dupras
204a9c69f8 editor: fix PSP leak in F 2020-05-07 08:38:57 -04:00
5 changed files with 18 additions and 9 deletions

View File

@ -2,8 +2,8 @@ T ( n -- ): select line n for editing.
P xxx: put typed line on selected line.
U xxx: insert typed line on selected line.
F xxx: find typed string in block.
I xxx: insert typed string at cursor
I xxx: insert typed string at cursor.
E: Delete previously found string.

View File

@ -1,5 +1,5 @@
50 LOAD+ ( B152, extras )
1 6 LOADR+
1 7 LOADR+
: BROWSE
0 ACC ! L

View File

@ -7,6 +7,6 @@
OVER BLK) = OR ( a1 a2 f1|f2 )
UNTIL
DUP BLK) < IF BLK( - FBUF + -^ EDPOS ! THEN
EDPOS @ 64 / _pln
EDPOS @ 64 / _pln DROP
;

10
blk/108
View File

@ -1,9 +1,9 @@
: _ilen ( length of str in IBUF )
IBUF BEGIN C@+ EOL? UNTIL IBUF - 1- ;
: _blen ( buf -- length of str in buf )
DUP BEGIN C@+ EOL? UNTIL -^ 1- ;
: _rbufsz ( size of linebuf to the right of curpos )
EDPOS @ 64 MOD 63 -^ ;
: _I
IBUF _type EDPOS @ 64 MOD ( cno )
63 -^ _ilen ( rbuffsize ilen )
2DUP > IF
IBUF _type _rbufsz IBUF _blen 2DUP > IF
SWAP OVER - ( ilen chars-to-move )
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
3 PICK MOVE- ( ctm ilen )

9
blk/109 Normal file
View File

@ -0,0 +1,9 @@
: E
FBUF _blen EDPOS @ _cpos 2DUP + ( l a1 a1+l )
SWAP _rbufsz MOVE ( l )
( get to next line - l )
DUP EDPOS @ 0xffc0 AND 0x40 + -^ _cpos ( l a )
SWAP 0 FILL
EDPOS @ 64 / _pln
;