VE: Add X

This commit is contained in:
Virgil Dupras 2020-06-05 14:01:39 -04:00
parent 6212a08866
commit 9d4e9ef08d
3 changed files with 7 additions and 4 deletions

View File

@ -1,9 +1,9 @@
: E : X ( len -- , delete len chars after curpos )
FBUF _blen EDPOS @ _cpos 2DUP + ( l a1 a1+l ) EDPOS @ _cpos 2DUP + ( l a1 a1+l )
SWAP _rbufsz MOVE ( l ) SWAP _rbufsz MOVE ( l )
( get to next line - l ) ( get to next line - l )
DUP EDPOS @ 0xffc0 AND 0x40 + -^ _cpos ( l a ) DUP EDPOS @ 0xffc0 AND 0x40 + -^ _cpos ( l a )
SWAP 0 FILL SWAP 0 FILL
EDPOS @ 64 / _pln EDPOS @ 64 / _pln ;
; : E FBUF _blen X ;

View File

@ -5,6 +5,8 @@
'I', 'F' and 'E' invoke the corresponding command from the 'I', 'F' and 'E' invoke the corresponding command from the
Block Editor (B100). Refer to documentation there. Block Editor (B100). Refer to documentation there.
'X' deletes "modifier" characters following cursor.
'R' goes into replace mode at current cursor position. 'R' goes into replace mode at current cursor position.
Following keystrokes replace current character and advance Following keystrokes replace current character and advance
cursor. Press return to return to normal mode. cursor. Press return to return to normal mode.

View File

@ -9,6 +9,7 @@
: $I mode! 'I' EMIT 3 1 AT-XY _I contents mode! SPC ; : $I mode! 'I' EMIT 3 1 AT-XY _I contents mode! SPC ;
: $F mode! 'F' EMIT 3 2 AT-XY _F setpos mode! SPC ; : $F mode! 'F' EMIT 3 2 AT-XY _F setpos mode! SPC ;
: $E E contents ; : $E E contents ;
: $X acc@ X contents ;
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ; : $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
: $H 0acc EDPOS @ 0x3c0 AND EDPOS ! ; : $H 0acc EDPOS @ 0x3c0 AND EDPOS ! ;
: $L 0acc EDPOS @ 0x3f OR EDPOS ! ; : $L 0acc EDPOS @ 0x3f OR EDPOS ! ;