summaryrefslogtreecommitdiff
path: root/Libraries/Drei/drei-redisplay.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/Drei/drei-redisplay.lisp')
-rw-r--r--Libraries/Drei/drei-redisplay.lisp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/Drei/drei-redisplay.lisp b/Libraries/Drei/drei-redisplay.lisp
index 405d61f8..20b94f6b 100644
--- a/Libraries/Drei/drei-redisplay.lisp
+++ b/Libraries/Drei/drei-redisplay.lisp
@@ -353,7 +353,9 @@ last line."
error if there is no such line (note that even an empty buffer
consists of a single line on display, as long as it has been
redislayed at some point)."
- (elt (displayed-lines view) (1- (displayed-lines-count view))))
+ (let ((count (displayed-lines-count view)))
+ (when (plusp count)
+ (elt (displayed-lines view) (1- count)))))
(defun ensure-line-stroke-information-size (line min-size)
"Ensure that the array of strokes in `line' contains at least