mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 04:28:05 +11:00
VE: add mode indicator in status bar
This commit is contained in:
parent
2bf4db59ed
commit
297c187426
2
blk/125
2
blk/125
@ -1,2 +1,2 @@
|
||||
'? UPPER NOT [IF] 33 LOAD+ [THEN] DROP ( B158 )
|
||||
1 3 LOADR+
|
||||
1 4 LOADR+
|
||||
|
4
blk/126
4
blk/126
@ -1,5 +1,5 @@
|
||||
CREATE CMD 2 C, '$' C, 0 C,
|
||||
VARIABLE MODE VARIABLE ACC VARIABLE POS
|
||||
VARIABLE MODE VARIABLE MODEC VARIABLE ACC VARIABLE POS
|
||||
: 0acc 0 ACC ! ;
|
||||
: acc@ ACC @ 1 MAX 0acc ;
|
||||
: num ACC @ SWAP _pdacc IF DROP ELSE ACC ! THEN ;
|
||||
@ -8,6 +8,6 @@ VARIABLE MODE VARIABLE ACC VARIABLE POS
|
||||
: clrln DUP aty COLS nspcs aty ;
|
||||
: clrscr LINES 0 DO I clrln LOOP ;
|
||||
: status 0 clrln ." BLK" SPC BLK> ? SPC ACC ?
|
||||
SPC POS @ 64 /MOD . ',' EMIT . ;
|
||||
SPC POS @ 64 /MOD . ',' EMIT . SPC MODEC C@ EMIT ;
|
||||
: contents 1 aty BLK> @ LIST ;
|
||||
: selblk BLK@ contents ;
|
||||
|
9
blk/128
9
blk/128
@ -4,11 +4,8 @@
|
||||
: $W POS @ BLK( + acc@ 0 DO
|
||||
BEGIN C@- WS? UNTIL BEGIN C@- WS? NOT UNTIL LOOP
|
||||
1+ BLK( - DUP 0< IF DROP 0 THEN POS ! ;
|
||||
: modeM EXECUTE ;
|
||||
: handle ( c -- f )
|
||||
: handleM ( c -- f )
|
||||
DUP '0' '9' =><= IF num 0 EXIT THEN
|
||||
DUP CMD 2+ C! CMD FIND IF MODE @ EXECUTE ELSE DROP THEN
|
||||
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
||||
UPPER 'Q' = ;
|
||||
: VE clrscr 0acc 0 POS ! ['] modeM MODE ! contents
|
||||
BEGIN status setpos KEY handle UNTIL 18 aty ;
|
||||
|
||||
: modeM ['] handleM MODE ! 'M' MODEC C! ;
|
||||
|
Loading…
Reference in New Issue
Block a user