collapseos/blk/378
Virgil Dupras 838c88459b Make BLK@ FLUSH only if loading a different block
Otherwise, when editing a file with VE, we would constantly write
to disk, which is a bit inefficient.
2020-06-11 21:42:52 -04:00

15 lines
206 B
Plaintext

: BLK! ( -- )
BLK> @ BLK!* @ EXECUTE
0 BLKDTY !
;
: FLUSH BLKDTY @ IF BLK! THEN ;
: BLK@ ( n -- )
DUP BLK> @ = IF DROP EXIT THEN
FLUSH DUP BLK> ! BLK@* @ EXECUTE ;
: BLK!! 1 BLKDTY ! ;