Skip to content

Commit

Permalink
fix: Fix mode-line not updating after activating display-wttr-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
josegpt committed Feb 27, 2022
1 parent 29ccec1 commit 9ef6043
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions display-wttr.el
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,15 @@ instead updated by the `display-wttr' function.")
(defun display-wttr-sentinel (process event)
"Update `display-wttr-string' only when the fetcher is done."
(when (string= "finished\n" event)
(setq display-wttr-string (string-join display-wttr-list " "))))
(setq display-wttr-string
(concat (string-join display-wttr-list " ") " "))
(run-hooks 'display-wttr-hook))
(force-mode-line-update 'all))

(defun display-wttr-filter (proc string)
"Update the `display-wttr' info in the mode line."
(add-to-list 'display-wttr-list
(string-join (split-string string) " ") t)
(run-hooks 'display-wttr-hook)
(force-mode-line-update 'all))
(string-join (split-string string) " ") t))

(defun display-wttr-update ()
"Creates a new background process to update wttr string."
Expand Down

0 comments on commit 9ef6043

Please sign in to comment.