1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-10-06 08:10:54 +11:00
collapseos/blk/127
Virgil Dupras e7a6c777c7 VE: refactor mode indicators
The indicator is going to be empty most of the time and will be
emitted by the mode changer directly. That's going to the upper-right
corner and the status bar avoids emitting in that area.
2020-06-05 10:38:05 -04:00

13 lines
434 B
Plaintext

: setpos EDPOS @ 64 /MOD
3 + ( header ) SWAP 3 + ( gutter ) SWAP AT-XY ;
: pos+ EDPOS @ + 1024 MOD EDPOS ! ;
: cmv ( n -- , char movement ) acc@ * pos+ ;
: $; 0acc ;
: $g ACC @ selblk 0acc ;
: $[ BLK> @ acc@ - selblk ;
: $] BLK> @ acc@ + selblk ;
: $I mode! 'I' EMIT 3 1 AT-XY I contents mode! SPC ;
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
: $H 0acc EDPOS @ 0x3c0 AND EDPOS ! ;
: $L 0acc EDPOS @ 0x3f OR EDPOS ! ;