]> git.eshelyaron.com Git - emacs.git/commitdiff
Align profiler's header-line-format to column 0, to work correctly on tty's
authorAlan Mackenzie <acm@muc.de>
Tue, 22 Dec 2020 16:57:46 +0000 (16:57 +0000)
committerAlan Mackenzie <acm@muc.de>
Tue, 22 Dec 2020 16:57:46 +0000 (16:57 +0000)
* lisp/profiler.el (profiler-report-header-line-format): Propertize the first
space with 'display '(space :align-to 0).

lisp/profiler.el

index 13ac040f565cacdc8e8db8c1dc34d18459fe8297..b25eed05bdbf75fc3f4bb8dfa8a47abd53de4f29 100644 (file)
@@ -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))