Quellcode durchsuchen

VE: add I command

Also, add insert and find buffers to the header, making it 3 lines
high.

Also, fix the "I" overshadowing word which wasn't operating on the
proper RSP level.

Also, fix I which didn't mark the block as dirty.
pull/107/head
Virgil Dupras vor 4 Jahren
Ursprung
Commit
4af93d53e3
5 geänderte Dateien mit 20 neuen und 6 gelöschten Zeilen
  1. +2
    -2
      blk/108
  2. +3
    -0
      blk/122
  3. +1
    -1
      blk/126
  4. +2
    -1
      blk/127
  5. +12
    -2
      blk/129

+ 2
- 2
blk/108 Datei anzeigen

@@ -2,7 +2,7 @@
DUP BEGIN C@+ EOL? UNTIL -^ 1- ;
: _rbufsz ( size of linebuf to the right of curpos )
EDPOS @ 64 MOD 63 -^ ;
: i I ; ( save overshoadowed )
: i COMPILE I ; IMMEDIATE ( save overshadowed )
: I
IBUF _type _rbufsz IBUF _blen 2DUP > IF
TUCK - ( ilen chars-to-move )
@@ -12,5 +12,5 @@
ELSE DROP ( ilen becomes rbuffsize )
THEN
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen )
EDPOS +! EDPOS @ 64 / _pln
BLK!! EDPOS +! EDPOS @ 64 / _pln
;

+ 3
- 0
blk/122 Datei anzeigen

@@ -1,3 +1,6 @@
'H' goes to the beginning of the line, 'L' to the end.

'w' moves forward by a word. 'W' moves backward by a word.

'I' inserts text by calling the "I" command from the Block
editor.

+ 1
- 1
blk/126 Datei anzeigen

@@ -9,5 +9,5 @@ VARIABLE MODE VARIABLE MODEC
: clrscr LINES 0 DO i clrln LOOP ;
: status 0 clrln ." BLK" SPC BLK> ? SPC ACC ?
SPC EDPOS @ 64 /MOD . ',' EMIT . SPC MODEC C@ EMIT ;
: contents 1 aty BLK> @ LIST ;
: contents 3 aty BLK> @ LIST ;
: selblk BLK@ contents ;

+ 2
- 1
blk/127 Datei anzeigen

@@ -1,11 +1,12 @@
: setpos EDPOS @ 64 /MOD
1+ ( status line ) SWAP 3 + ( gutter ) SWAP AT-XY ;
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 3 1 AT-XY I contents ;
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
: $H 0acc EDPOS @ 0x3c0 AND EDPOS ! ;
: $L 0acc EDPOS @ 0x3f OR EDPOS ! ;

+ 12
- 2
blk/129 Datei anzeigen

@@ -1,3 +1,13 @@
: VE clrscr 0acc 0 EDPOS ! modeM contents
BEGIN status setpos KEY MODE @ EXECUTE UNTIL 18 aty ;
: bufp ( buf -- )
DUP 64 + SWAP DO
i C@ DUP 0x20 < IF DROP 0x20 THEN EMIT
LOOP ;
: bufs
1 aty ." I: " IBUF bufp
2 aty ." F: " FBUF bufp ;
: c<over KEY DUP EMIT DUP 0x0a = IF DROP 0x0d THEN ;
: VE ['] c<over 0x08 ( C< override ) RAM+ !
clrscr 0acc 0 EDPOS ! modeM contents
BEGIN status bufs setpos KEY MODE @ EXECUTE UNTIL
0 0x08 RAM+ ! 19 aty ;


Laden…
Abbrechen
Speichern