Fix the bug with miscalculation of label boundaries

This commit is contained in:
Sameer Rahmani 2023-06-18 18:21:55 +01:00
parent 74d49748d4
commit 6182158fc6
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
2 changed files with 4 additions and 5 deletions

View File

@ -154,7 +154,7 @@ It will pass WATCH-PARAMS to the unit's `:fn'"
(let ((res (apply f watch-params)))
(with-current-buffer buf
(save-excursion
(goto-char start-point)
(goto-char (+ 1 start-point))
(delete-char len)
(insert (truncate-string-to-width res len))))))

View File

@ -41,7 +41,6 @@
(defvar noether/-time "")
(defvar noether/-timer nil)
(defun noether/-set-time ()
(message "here")
(setq noether/-time (format-time-string "%H:%M:%S")))
(defun noether/-time-format (_ v _ _)
@ -50,7 +49,7 @@
(defunit line-unit
"Show the line number."
:label "L: "
:label "L:"
:len 4
:init (lambda ()
(add-hook 'post-command-hook #'noether/-update-line))
@ -61,7 +60,7 @@
(defunit time-unit
"just the time for your bar."
:label "T: "
:label "T:"
:len 8
:init (lambda ()
(setq noether/-timer
@ -82,7 +81,7 @@
:units
(list
(line-unit)
(time-unit :label "<B>")))
(time-unit :label "B:")))
(setq noether/views (list example-bar))