小建议 awesome-tray-get-echo-format-string 如果多于一行则添加换行符,使tray始终右对齐
Closed this issue · 3 comments
QiangF commented
(defun awesome-tray-get-echo-format-string (message-string)
(let* ((tray-info (awesome-tray-build-info))
;; (frame (if exwm--floating-frame exwm-workspace--minibuffer))
(frame (when (and exwm_enable (exwm-workspace--minibuffer-own-frame-p))
exwm-workspace--minibuffer nil))
(blank-length (- (frame-width frame) (length tray-info) (length message-string) awesome-tray-info-padding-right))
(empty-fill-string (make-string (max 0 (- (frame-width frame) (length tray-info) awesome-tray-info-padding-right)) ?\ ))
(message-fill-string (make-string (max 0 (- (frame-width frame) (length message-string) (length tray-info) awesome-tray-info-padding-right)) ?\ ))
)
(prog1
(if (> blank-length 0)
;; Fill message's end with whitespace to keep tray info at right of minibuffer.
(concat message-string message-fill-string tray-info)
(if (and awesome-tray-last-tray-info
message-string
(string-suffix-p awesome-tray-last-tray-info message-string))
;; Fill empty whitespace if new message contain duplicate tray-info (cause by move mouse on minibuffer window).
(concat empty-fill-string tray-info)
;; Don't fill whitepsace at end of message if new message is very long.
(concat message-string "\n" (concat empty-fill-string tray-info))))
;; Record last tray information.
(setq awesome-tray-last-tray-info tray-info))))
manateelazycat commented
给一个补丁?这样我好知道你改进的地方。
谢谢
QiangF commented
改的那一行单独空行隔开了的。补丁不太会用。
manateelazycat commented
a2fca0f 已经修复,谢谢帮忙!