Make quick refresh from line deletion work on the top line

This commit is contained in:
John Lorentzson 2025-07-31 11:11:44 +02:00
parent 62c19a38d8
commit 1f17283b2a

View file

@ -385,6 +385,8 @@ serial connection the editor normally runs under.")
:start1 start) :start1 start)
(delete-line right-line) (delete-line right-line)
(let ((view (current-view *editor*))) (let ((view (current-view *editor*)))
(when (eql left-line (prev-line (top-line view)))
(get-line-into-view left-line view))
(update-view-bottom view) (update-view-bottom view)
(cond ((and (line-in-view left-line view) (cond ((and (line-in-view left-line view)
(< (1+ (view-line-number view left-line)) (< (1+ (view-line-number view left-line))
@ -397,6 +399,7 @@ serial connection the editor normally runs under.")
(unless (null (bottom-line view)) (unless (null (bottom-line view))
(redisplay-view-from-line view (bottom-line view)))) (redisplay-view-from-line view (bottom-line view))))
(t (t
(get-line-into-view left-line view)
(redisplay-view-from-line (current-view *editor*) left-line)))) (redisplay-view-from-line (current-view *editor*) left-line))))
(setf (cursor-line (cursor *editor*)) left-line (setf (cursor-line (cursor *editor*)) left-line
(cursor-column (cursor *editor*)) start) (cursor-column (cursor *editor*)) start)