Editor backspace/del cuts selection if any

parent 3e89d593
......@@ -189,6 +189,10 @@ end-class edit-actor
2dup swap r@ safe/string xselw delete
swap xselw - swap
r> edit-update 0 ;
: edit-bs ( max span addr pos1 -- max span addr pos1 false )
xselw 0> IF edit-cut ELSE ?xdel THEN ;
: edit-del ( max span addr pos1 -- max span addr pos1 false )
xselw 0> IF edit-cut ELSE <xdel> THEN ;
' edit-next-line ctrl N bindkey
' edit-prev-line ctrl P bindkey
......@@ -200,14 +204,17 @@ end-class edit-actor
' edit-enter #lf bindkey
' edit-enter #cr bindkey
' false ctrl L bindkey
' edit-next-line k-down ebindkey
' edit-prev-line k-up ebindkey
' edit-next-line k-next ebindkey
' edit-prev-line k-prior ebindkey
' edit-enter k-eof ebindkey
' edit-enter k-enter ebindkey
' false k-winch ebindkey
' edit-bs ctrl H bindkey
' edit-del ctrl D bindkey
' edit-next-line k-down ebindkey
' edit-prev-line k-up ebindkey
' edit-next-line k-next ebindkey
' edit-prev-line k-prior ebindkey
' edit-enter k-eof ebindkey
' edit-enter k-enter ebindkey
' false k-winch ebindkey
' edit-del k-delete ebindkey
edit-terminal edit-out !
......
......@@ -415,11 +415,15 @@ previous
Defer scale-me ' terminal-scale-me is scale-me
2Variable screen-xy
2Variable screen-wh
[IFDEF] screen-xywh@
2Variable screen-xy
2Variable screen-wh
[THEN]
: config-changer ( -- )
[IFDEF] screen-xywh@
screen-xywh@ screen-wh 2! screen-xy 2!
[THEN]
getwh >screen-orientation scale-me need-sync on
form-chooser ;
: ?config-changer ( -- )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment