Przeglądaj źródła

VE: decouple from core's LIST

I'm planning on de-hardcoding columns in VE a bit to add support
for screens narrower than 67 columns. There's a lot of hardcoding.

Let's begin with not using core's LIST anymore. This allows us to
spit 1-16 numbers only at startup.
master
Virgil Dupras 3 lat temu
rodzic
commit
10da104873
3 zmienionych plików z 8 dodań i 4 usunięć
  1. +1
    -3
      blk/126
  2. +6
    -0
      blk/127
  3. +1
    -1
      blk/131

+ 1
- 3
blk/126 Wyświetl plik

@@ -11,6 +11,4 @@ CREATE PREVPOS 0 , CREATE PREVBLK 0 ,
: status 0 aty ." BLK" SPC BLK> ? SPC ACC ?
SPC EDPOS @ 64 /MOD . ',' EMIT . SPC
BLKDTY @ IF '*' EMIT THEN 10 nspcs ;
: contents 3 aty BLK> @ LIST 3 16 gutter ;
: selblk BLK> @ PREVBLK ! BLK@ contents ;
: mode! ( c -- ) 63 0 AT-XY ;
: nums 17 1 DO 2 I + aty I . SPC SPC LOOP ;

+ 6
- 0
blk/127 Wyświetl plik

@@ -1,3 +1,9 @@
: contents 16 0 DO 3 I 3 + AT-XY
64 I * BLK( + DUP 64 + SWAP DO
I C@ 0x20 MAX EMIT LOOP LOOP
3 16 gutter ;
: selblk BLK> @ PREVBLK ! BLK@ contents ;
: mode! ( c -- ) 63 0 AT-XY ;
: pos! ( newpos -- ) EDPOS @ PREVPOS !
DUP 0< IF DROP 0 THEN 1023 MIN EDPOS ! ;
: setpos ( -- ) EDPOS @ 64 /MOD


+ 1
- 1
blk/131 Wyświetl plik

@@ -9,6 +9,6 @@
1 aty ." I: " IBUF bufp
2 aty ." F: " FBUF bufp 0 3 gutter ;
: VE
clrscr 0 ACC ! 0 PREVPOS ! contents
clrscr 0 ACC ! 0 PREVPOS ! nums contents
BEGIN status bufs setpos KEY handle UNTIL
19 aty (infl) ;

Ładowanie…
Anuluj
Zapisz