Fix COM-FORWARD-DELETE

This commit is contained in:
John Lorentzson 2025-07-21 21:13:30 +02:00
parent fa4fa088fe
commit 2331d15e11

View file

@ -580,10 +580,15 @@ Additionally ensures correct line numbers on the way, as a bonus."
(feep))))
(defun com-forward-delete ()
;; TODO: Check for end of line
(with-editor-accessors *editor* (:current-column column
:current-line line)
(delete-character-in-line line column)))
(cond ((and (= column (line-length line)) (null (next-line line)))
(feep))
((= column (line-length line))
(merge-lines line (next-line line)))
(t
(delete-character-in-line line column)
(redisplay-line line :start column)))))
(defun com-backward-delete ()
(with-editor-accessors *editor* (:current-column column