mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-02 04:36:43 +01:00
- forced resizing of suggestion window when terminal is resized.
This commit is contained in:
parent
423779986a
commit
56b837c1fe
@ -127,7 +127,8 @@ be either `:keybinding' or `:string'. the former for key command the latter for
|
|||||||
(error-message-attributes error-message-attributes)
|
(error-message-attributes error-message-attributes)
|
||||||
(info-message-bg info-message-bg)
|
(info-message-bg info-message-bg)
|
||||||
(info-message-fg info-message-fg)
|
(info-message-fg info-message-fg)
|
||||||
(info-message-attributes info-message-attributes)) object
|
(info-message-attributes info-message-attributes)
|
||||||
|
(suggestions-win suggestions-win)) object
|
||||||
(let* ((w (win-width *main-window*))
|
(let* ((w (win-width *main-window*))
|
||||||
(h +command-window-height+)
|
(h +command-window-height+)
|
||||||
(x 0)
|
(x 0)
|
||||||
@ -153,6 +154,8 @@ be either `:keybinding' or `:string'. the former for key command the latter for
|
|||||||
:bgcolor bg))
|
:bgcolor bg))
|
||||||
(win-resize object w h)
|
(win-resize object w h)
|
||||||
(win-move object x y)
|
(win-move object x y)
|
||||||
|
(when suggestions-win
|
||||||
|
(refresh-config suggestions-win))
|
||||||
object))))))
|
object))))))
|
||||||
|
|
||||||
(defmethod calculate ((object command-window) dt)
|
(defmethod calculate ((object command-window) dt)
|
||||||
@ -560,6 +563,7 @@ command line."
|
|||||||
(setf input-mode mode)
|
(setf input-mode mode)
|
||||||
(when suggestions-win
|
(when suggestions-win
|
||||||
(win-hide suggestions-win))
|
(win-hide suggestions-win))
|
||||||
|
(refresh-config suggestions-cached-win)
|
||||||
(setf suggestions-win suggestions-cached-win)))
|
(setf suggestions-win suggestions-cached-win)))
|
||||||
|
|
||||||
(defmacro gen-set-mode-function (fn-name mode suggestions-cached-win)
|
(defmacro gen-set-mode-function (fn-name mode suggestions-cached-win)
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
`(with-accessors ((,slot croatoan-window)) ,window
|
`(with-accessors ((,slot croatoan-window)) ,window
|
||||||
,@body))
|
,@body))
|
||||||
|
|
||||||
(defmacro when-window-shown ((window &key (min-valid-height 5) (min-valid-width 5)) &body body)
|
(defmacro when-window-shown ((window &key (min-valid-height 2) (min-valid-width 2)) &body body)
|
||||||
(with-gensyms (height width)
|
(with-gensyms (height width)
|
||||||
`(when ,window
|
`(when ,window
|
||||||
(let ((,height (if (window-uses-border-p ,window)
|
(let ((,height (if (window-uses-border-p ,window)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user