1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-21 08:50:51 +01:00

- fixed excessive page scrolling in message window.

This commit is contained in:
cage 2022-07-08 15:17:01 +02:00
parent b0eccdc0af
commit 1110bf809d

View File

@ -611,11 +611,15 @@
(defmethod scroll-next-page ((object message-window)) (defmethod scroll-next-page ((object message-window))
(with-accessors ((rows rows) (with-accessors ((rows rows)
(row-selected-index row-selected-index)) object (row-selected-index row-selected-index)) object
(let ((actual-window-height (win-height-no-border object))) (let ((actual-window-height (1- (win-height-no-border object)))
(when (and (> (- (rows-length object) (rows-length (rows-length object)))
(when (and (> (- rows-length
row-selected-index) row-selected-index)
actual-window-height) actual-window-height)
(/= (row-move object actual-window-height) (/= (row-move object (min actual-window-height
(- rows-length
(+ row-selected-index
actual-window-height))))
0)) 0))
(draw object))))) (draw object)))))