mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-18 08:20:35 +01:00
- added adjust-strategy-last to show text in message-window;
- removed call to 'adjust-selected-rows' when redrawing message-window; - fixed 'adjust-selected-rows', wa never actually called.
This commit is contained in:
parent
7a919d64f1
commit
5e230407c6
@ -226,11 +226,20 @@
|
|||||||
(defun adjust-rows-select-first (window)
|
(defun adjust-rows-select-first (window)
|
||||||
(select-first-row window))
|
(select-first-row window))
|
||||||
|
|
||||||
|
(defun adjust-rows-select-last (window)
|
||||||
|
(with-accessors ((rows rows)) window
|
||||||
|
(when rows
|
||||||
|
(let ((height (win-height-no-border window)))
|
||||||
|
(when (not (< (rows-length window) height))
|
||||||
|
(select-row window (- (rows-length window)
|
||||||
|
height))))))
|
||||||
|
window)
|
||||||
|
|
||||||
(defmethod adjust-selected-rows ((object row-oriented-widget) (strategy function))
|
(defmethod adjust-selected-rows ((object row-oriented-widget) (strategy function))
|
||||||
(with-accessors ((row-selected-index row-selected-index)) object
|
(with-accessors ((row-selected-index row-selected-index)) object
|
||||||
(when (< (rows-length object)
|
(when (< row-selected-index
|
||||||
row-selected-index)
|
(rows-length object))
|
||||||
(funcall strategy object)))
|
(funcall strategy object)))
|
||||||
object)
|
object)
|
||||||
|
|
||||||
(defmethod selected-row ((object row-oriented-widget))
|
(defmethod selected-row ((object row-oriented-widget))
|
||||||
|
@ -186,15 +186,13 @@
|
|||||||
(print-text window line-position-mark mark-x mark-y))))
|
(print-text window line-position-mark mark-x mark-y))))
|
||||||
|
|
||||||
(defmethod draw ((object message-window))
|
(defmethod draw ((object message-window))
|
||||||
(with-accessors ((adjust-rows-strategy adjust-rows-strategy)) object
|
(when-window-shown (object)
|
||||||
(when-window-shown (object)
|
(win-clear object :redraw nil)
|
||||||
(adjust-selected-rows object adjust-rows-strategy)
|
(win-box object)
|
||||||
(win-clear object :redraw nil)
|
(draw-text object)
|
||||||
(win-box object)
|
(when (not (line-oriented-window:rows-empty-p object))
|
||||||
(draw-text object)
|
(draw-buffer-line-mark object))
|
||||||
(when (not (line-oriented-window:rows-empty-p object))
|
(call-next-method)))
|
||||||
(draw-buffer-line-mark object))
|
|
||||||
(call-next-method))))
|
|
||||||
|
|
||||||
(let ((index 0)
|
(let ((index 0)
|
||||||
(frames -1)
|
(frames -1)
|
||||||
|
@ -1863,6 +1863,7 @@
|
|||||||
:select-row
|
:select-row
|
||||||
:select-first-row
|
:select-first-row
|
||||||
:adjust-rows-select-first
|
:adjust-rows-select-first
|
||||||
|
:adjust-rows-select-last
|
||||||
:adjust-selected-rows
|
:adjust-selected-rows
|
||||||
:selected-row
|
:selected-row
|
||||||
:ignore-selecting-action
|
:ignore-selecting-action
|
||||||
@ -1989,6 +1990,7 @@
|
|||||||
(:export
|
(:export
|
||||||
:message-window
|
:message-window
|
||||||
:metadata
|
:metadata
|
||||||
|
:adjust-rows-strategy
|
||||||
:gemini-window-p*
|
:gemini-window-p*
|
||||||
:gemini-window-p
|
:gemini-window-p
|
||||||
:display-gemini-text-p
|
:display-gemini-text-p
|
||||||
@ -1996,6 +1998,7 @@
|
|||||||
:row-get-original-object
|
:row-get-original-object
|
||||||
:viewport-width
|
:viewport-width
|
||||||
:draw-downloading-animation
|
:draw-downloading-animation
|
||||||
|
:adjust-selected-rows
|
||||||
:visible-rows
|
:visible-rows
|
||||||
:row-vertical-space-p
|
:row-vertical-space-p
|
||||||
:row-preformatted-p
|
:row-preformatted-p
|
||||||
|
Loading…
x
Reference in New Issue
Block a user