2020-06-07 21:25:02 +10:00
|
|
|
: $f EDPOS @ PREVPOS @ 2DUP = IF 2DROP EXIT THEN
|
|
|
|
2DUP > IF DUP pos! SWAP THEN
|
|
|
|
( p1 p2, p1 < p2 ) OVER - 64 MIN ( pos len ) FBUF _zbuf
|
|
|
|
SWAP _cpos FBUF ( len src dst ) ROT MOVE ;
|
|
|
|
: $R ( replace mode )
|
|
|
|
mode! 'R' EMIT
|
2020-06-12 12:29:05 +10:00
|
|
|
BEGIN setpos KEY DUP BS? IF -1 EDPOS +! DROP 0 THEN
|
|
|
|
DUP 0x20 >= IF
|
2020-06-12 10:31:18 +10:00
|
|
|
DUP EMIT EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
|
2020-06-07 21:25:02 +10:00
|
|
|
THEN UNTIL mode! SPC contents ;
|
2020-06-29 10:34:39 +10:00
|
|
|
: $O _U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
|
|
|
|
: $o EDPOS @ 0x3c0 < IF EDPOS @ 64 + EDPOS ! $O THEN ;
|
2020-06-11 06:59:12 +10:00
|
|
|
: $D $H 64 icpy
|
2020-06-23 21:08:21 +10:00
|
|
|
acc@ 0 DO 16 EDPOS @ 64 / DO I _mvln- LOOP LOOP
|
2020-06-07 23:30:31 +10:00
|
|
|
BLK!! contents ;
|