Add failsafe to REDISPLAY-LINE for when the editor fucks it up
Occasionally the editor will try to redisplay lines that are off-screen, even though that shouldn't happen. Ignoring it is seemingly harmless, so it now signals a warning.
This commit is contained in:
parent
f3cbadfa54
commit
1f52377b2b
1 changed files with 4 additions and 2 deletions
|
@ -424,7 +424,7 @@ serial connection the editor normally runs under.")
|
||||||
(move-cursor (view-line-number (buffer-view buffer) line) char-pos)
|
(move-cursor (view-line-number (buffer-view buffer) line) char-pos)
|
||||||
(write-char (aref (line-content line) char-pos) *eio*)
|
(write-char (aref (line-content line) char-pos) *eio*)
|
||||||
(update-buffer-cursor buffer)))
|
(update-buffer-cursor buffer)))
|
||||||
(t
|
((line-in-view line (buffer-view buffer))
|
||||||
(hide-cursor)
|
(hide-cursor)
|
||||||
(move-cursor (view-line-number (buffer-view buffer) line) start)
|
(move-cursor (view-line-number (buffer-view buffer) line) start)
|
||||||
(write-byte #x1B *eio*)
|
(write-byte #x1B *eio*)
|
||||||
|
@ -432,7 +432,9 @@ serial connection the editor normally runs under.")
|
||||||
(write-char #\K *eio*)
|
(write-char #\K *eio*)
|
||||||
(write-string (line-content line) *eio* :start start)
|
(write-string (line-content line) *eio* :start start)
|
||||||
(update-buffer-cursor buffer)
|
(update-buffer-cursor buffer)
|
||||||
(show-cursor))))
|
(show-cursor))
|
||||||
|
(t
|
||||||
|
(warn "Tried to redisplay an off-screen line."))))
|
||||||
(force-output *eio*))
|
(force-output *eio*))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue