From 2331d15e116d0876cb8ddae0350028e3fd796e1c Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Mon, 21 Jul 2025 21:13:30 +0200 Subject: [PATCH] Fix COM-FORWARD-DELETE --- wip-duuqnd/editor/editor.lisp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wip-duuqnd/editor/editor.lisp b/wip-duuqnd/editor/editor.lisp index a81bce4..60f6d01 100644 --- a/wip-duuqnd/editor/editor.lisp +++ b/wip-duuqnd/editor/editor.lisp @@ -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