From 13715859ef801b40648ea6487256f49a61f717d5 Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Thu, 31 Jul 2025 12:03:34 +0200 Subject: [PATCH] Allow inserting characters into a line without redisplay --- editor/editor.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/editor.lisp b/editor/editor.lisp index 3ee8bfc..a03f75a 100644 --- a/editor/editor.lisp +++ b/editor/editor.lisp @@ -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)