VE: add 'D'

This commit is contained in:
Virgil Dupras 2020-06-07 09:30:31 -04:00
parent 15acf30ca3
commit ab76d8d648
4 changed files with 21 additions and 10 deletions

View File

@ -6,7 +6,9 @@
( user-facing lines are 1-based ) ( user-facing lines are 1-based )
: T 1- DUP 64 * EDPOS ! _pln ; : T 1- DUP 64 * EDPOS ! _pln ;
: P IBUF _type IBUF EDPOS @ _cpos 64 MOVE BLK!! ; : P IBUF _type IBUF EDPOS @ _cpos 64 MOVE BLK!! ;
: _mvln+ ( ln -- move ln 1 line further ) : _mvln+ ( ln -- move ln 1 line down )
DUP 14 > IF DROP EXIT THEN DUP 14 > IF DROP EXIT THEN
_lpos DUP 64 + 64 MOVE _lpos DUP 64 + 64 MOVE ;
; : _mvln- ( ln -- move ln 1 line up )
DUP 14 > IF DROP 15 _lpos _zbuf
ELSE 1+ _lpos DUP 64 - 64 MOVE THEN ;

12
blk/122
View File

@ -8,9 +8,9 @@ Block Editor (B100). Refer to documentation there.
'o' inserts a blank line after the cursor. 'O', before. 'o' inserts a blank line after the cursor. 'O', before.
'f' puts the contents of your previous cursor movement into the 'D' deletes "modifier" lines at the cursor.
find buffer. If that movement was a forward movement, it brings
the cursor back where it was. This allows for an efficient
combination of movements and 'E'. For example, if you want to
delete the next word, you type 'w', then 'f', then check your
"F" buffer to be sure, then press 'E'. (cont.) (cont.)

View File

@ -1,3 +1,10 @@
'f' puts the contents of your previous cursor movement into the
find buffer. If that movement was a forward movement, it brings
the cursor back where it was. This allows for an efficient
combination of movements and 'E'. For example, if you want to
delete the next word, you type 'w', then 'f', then check your
"F" buffer to be sure, then press 'E'.
'X' deletes "modifier" characters following cursor. 'X' deletes "modifier" characters following cursor.
'R' goes into replace mode at current cursor position. 'R' goes into replace mode at current cursor position.

View File

@ -8,5 +8,7 @@
EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0 EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
THEN UNTIL mode! SPC contents ; THEN UNTIL mode! SPC contents ;
: $O EDPOS @ 0x3c0 ( 15 * 64 ) >= IF EXIT THEN : $O EDPOS @ 0x3c0 ( 15 * 64 ) >= IF EXIT THEN
_U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf contents ; _U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
: $o EDPOS @ 64 < IF EXIT THEN EDPOS @ 64 + EDPOS ! $O ; : $o EDPOS @ 64 < IF EXIT THEN EDPOS @ 64 + EDPOS ! $O ;
: $D acc@ 0 DO 16 EDPOS @ 64 / DO i _mvln- LOOP LOOP
BLK!! contents ;