From a0c25ee8fe700fe53a4f224fa887814b3a3c8ba8 Mon Sep 17 00:00:00 2001 From: cage Date: Sat, 31 Jul 2021 11:42:12 +0200 Subject: [PATCH] - prevented out of bound condition when scrolling message-window's contents (this was actually a regression). --- src/line-oriented-window.lisp | 3 ++- src/program-events.lisp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/line-oriented-window.lisp b/src/line-oriented-window.lisp index 6a81a23..20230cc 100644 --- a/src/line-oriented-window.lisp +++ b/src/line-oriented-window.lisp @@ -224,7 +224,8 @@ (select-row object 0)) (defun adjust-rows-select-first (window) - (select-first-row window)) + (when (rows window) + (select-first-row window))) (defun adjust-rows-select-last (window) (with-accessors ((rows rows)) window diff --git a/src/program-events.lisp b/src/program-events.lisp index 655ba43..12f147e 100644 --- a/src/program-events.lisp +++ b/src/program-events.lisp @@ -1143,6 +1143,8 @@ (progn (setf (gemini-viewer:gemini-metadata-source-file window-metadata) source) (setf (gemini-viewer:gemini-metadata-links window-metadata) links) + (funcall (message-window:adjust-rows-strategy win) + win) (line-oriented-window:update-all-rows win new-rows))))))) (defmethod process-event ((object gemini-got-line-event))