diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-07-21 15:19:02 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-07-21 15:19:02 +0300 |
commit | 845d6561ed07a8a979200a389a39db08dffccdc8 (patch) | |
tree | 1065ff3e94f00f1e898ee234a3dc679bb0c2d3db /lisp/proced.el | |
parent | c55e67081e9873a32b6e665e44f3e5a9c301255f (diff) | |
download | emacs-845d6561ed07a8a979200a389a39db08dffccdc8.tar.gz |
Fix Proced display header alignment under 'text-scale-adjust'
* lisp/proced.el (proced-mode): Force the header-line to scale
according to 'text-scale-adjust'.
(proced-header-line): Use width of the header-line's face's
characters as align-to units, not the width of the frame's
default face's font. (Bug#64752)
* src/xdisp.c (calc_pixel_width_or_height): Use font's
average_width or space_width, not max_width, as the correct
measure of the font's width. This is consistent with the rest of
the display engine.
Diffstat (limited to 'lisp/proced.el')
-rw-r--r-- | lisp/proced.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/proced.el b/lisp/proced.el index 03a7f1bebdf..b3d581a49d1 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -776,12 +776,12 @@ of the process. A value of nil indicates that there are no active refinements." (while (string-match "[ \t\n]+" hl pos) (setq pos (match-end 0)) (put-text-property (match-beginning 0) pos 'display - `(space :align-to ,(+ pos base)) + `(space :align-to (,(+ pos base) . width)) hl))) (setq hl (replace-regexp-in-string ;; preserve text properties "\\(%\\)" "\\1\\1" hl))) - (list (propertize " " 'display `(space :align-to ,base)) + (list (propertize " " 'display `(space :align-to (,base . width))) hl))) (defun proced-pid-at-point () @@ -894,6 +894,8 @@ normal hook `proced-post-display-hook'. (setq-local font-lock-defaults '(proced-font-lock-keywords t nil nil beginning-of-line)) (setq-local switch-to-buffer-preserve-window-point nil) + ;; So that the heading scales together with the body of the table. + (setq-local text-scale-remap-header-line t) (if (and (not proced-auto-update-timer) proced-auto-update-interval) (setq proced-auto-update-timer (run-at-time t proced-auto-update-interval |