diff --git a/src/line-oriented-window.lisp b/src/line-oriented-window.lisp index e9e5796..19225b4 100644 --- a/src/line-oriented-window.lisp +++ b/src/line-oriented-window.lisp @@ -238,9 +238,10 @@ (with-accessors ((rows rows)) window (when rows (let ((height (win-height-no-border window))) - (when (>= (rows-length window) height) - (select-row window (- (rows-length window) - height)))))) + (if (>= (rows-length window) height) + (select-row window (- (rows-length window) + height)) + (select-first-row window))))) window) (defmethod adjust-selected-rows ((object row-oriented-widget) (strategy function)) diff --git a/src/program-events.lisp b/src/program-events.lisp index f263c9e..c3e6d60 100644 --- a/src/program-events.lisp +++ b/src/program-events.lisp @@ -1230,8 +1230,9 @@ (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))))))) + (line-oriented-window:update-all-rows win new-rows) + (line-oriented-window:adjust-selected-rows specials:*message-window* + #'line-oriented-window:adjust-rows-select-first))))))) (defmethod process-event ((object gemini-got-line-event)) (with-accessors ((response payload)