Allow inserting characters into a line without redisplay

This commit is contained in:
John Lorentzson 2025-07-31 12:03:34 +02:00
parent 5af2ed3f2a
commit 13715859ef

View file

@ -327,7 +327,7 @@ serial connection the editor normally runs under.")
(defmethod line-length ((line line))
(length (line-content line)))
(defmethod insert-character-into-line ((line line) column character)
(defmethod insert-character-into-line ((line line) column character &key (try-redisplay-p t))
(unless (line-has-room-p line)
(error "No room on line."))
(cond ((= column (fill-pointer (line-content line)))
@ -339,7 +339,7 @@ serial connection the editor normally runs under.")
(replace (line-content line) to-shove
:start1 (1+ column))
(setf (char (line-content line) column) character))))
(when (line-in-view line (current-view *editor*))
(when (and try-redisplay-p (line-in-view line (current-view *editor*)))
(redisplay-line line :start column :addingp t)))
(defmethod delete-character-in-line ((line line) column)