mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 21:30:56 +11:00
16 lines
534 B
Plaintext
16 lines
534 B
Plaintext
: $w EDPOS @ BLK( + acc@ 0 DO
|
|
BEGIN C@+ WS? UNTIL BEGIN C@+ WS? NOT UNTIL LOOP
|
|
1- BLK( - 1023 MIN EDPOS ! ;
|
|
: $W EDPOS @ BLK( + acc@ 0 DO
|
|
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
|
|
1+ BLK( - DUP 0< IF DROP 0 THEN EDPOS ! ;
|
|
: $R ( replace mode )
|
|
mode! 'R' EMIT
|
|
BEGIN setpos C< DUP 0xd = NOT IF
|
|
EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
|
|
THEN UNTIL mode! SPC contents ;
|
|
: handle ( c -- f )
|
|
DUP '0' '9' =><= IF num 0 EXIT THEN
|
|
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
|
UPPER 'Q' = ;
|