diff --git a/editor/editor.lisp b/editor/editor.lisp index 1b8aed1..a44fed0 100644 --- a/editor/editor.lisp +++ b/editor/editor.lisp @@ -640,6 +640,17 @@ Additionally ensures correct line numbers on the way, as a bonus." (decf column) (redisplay-line line))))) +(defun com-kill-line () + (with-editor-accessors *editor* (:current-column column + :current-line line) + (cond ((and (= column (line-length line)) (null (next-line line))) + (feep)) + ((= column (line-length line)) + (com-forward-delete)) + (t + (setf (fill-pointer (line-content line)) column) + (redisplay-line line :start column))))) + (defun com-newline () (with-editor-accessors *editor* (:current-column column :current-line line) @@ -888,6 +899,7 @@ Additionally ensures correct line numbers on the way, as a bonus." (:left com-backward-char) (#\Del com-backward-delete) ((:c . #\d) com-forward-delete) + ((:c . #\k) com-kill-line) ((:c . #\j) com-newline) ((:c . #\n) com-new-buffer) ((:c . #\l) com-refresh-screen)