emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9449b81: Align profiler's header-line-format to column 0, to work


From: Alan Mackenzie
Subject: master 9449b81: Align profiler's header-line-format to column 0, to work correctly on tty's
Date: Tue, 22 Dec 2020 11:59:11 -0500 (EST)

branch: master
commit 9449b81f2761661f1e3a9187906c00f95b6f6ebd
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>

    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).
---
 lisp/profiler.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/profiler.el b/lisp/profiler.el
index 13ac040..b25eed0 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]