diff options
author | Alan Mackenzie <acm@muc.de> | 2020-12-22 16:57:46 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2020-12-22 16:57:46 +0000 |
commit | 9449b81f2761661f1e3a9187906c00f95b6f6ebd (patch) | |
tree | f9cef81cc9f6b738f3c7b3665cd3ae9fc38224f5 | |
parent | 9920929e7b538f8bf8fb1dd7a9ae7cd1fe5d2b31 (diff) | |
download | emacs-9449b81f2761661f1e3a9187906c00f95b6f6ebd.tar.gz emacs-9449b81f2761661f1e3a9187906c00f95b6f6ebd.tar.bz2 emacs-9449b81f2761661f1e3a9187906c00f95b6f6ebd.zip |
Align profiler's header-line-format to column 0, to work correctly on tty's
* lisp/profiler.el (profiler-report-header-line-format): Propertize the first
space with 'display '(space :align-to 0).
-rw-r--r-- | lisp/profiler.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/profiler.el b/lisp/profiler.el index 13ac040f565..b25eed05bdb 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -448,7 +448,7 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." :group 'profiler) (defvar profiler-report-cpu-line-format - '((14 right ((9 right) + '((17 right ((12 right) (5 right))) (1 left "%s") (0 left))) @@ -500,7 +500,11 @@ RET: expand or collapse")) (defun profiler-report-header-line-format (fmt &rest args) (let* ((header (apply #'profiler-format fmt args)) (escaped (replace-regexp-in-string "%" "%%" header))) - (concat " " escaped))) + (concat + (propertize " " + 'display '(space :align-to 0) + 'face 'fixed-pitch) + escaped))) (defun profiler-report-line-format (tree) (let ((diff-p (profiler-profile-diff-p profiler-report-profile)) |