diff options
| author | Constantine Vetoshev <gepardcv@gmail.com> | 2021-03-06 11:42:17 -0800 |
|---|---|---|
| committer | Constantine Vetoshev <gepardcv@gmail.com> | 2021-03-06 11:42:17 -0800 |
| commit | 83aa8dc6ff8e85c6f91b27eaec905b428df47bd6 (patch) | |
| tree | b52696031d052541e03285c8622aecbb9ca6cd9c | |
| parent | 541bba258cfea8a8e9d9583d71dfc3e4c59c519b (diff) | |
Fix some bugs with mode-line updates.
| -rw-r--r-- | perspective.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/perspective.el b/perspective.el index 93c9731..3b8b551 100644 --- a/perspective.el +++ b/perspective.el @@ -577,7 +577,11 @@ For example, (persp-intersperse '(1 2 3) 'a) gives '(1 a 2 a 3)." "Select the clicked perspective. EVENT is the click event triggering this function call." (interactive "e") - (persp-switch (format "%s" (car (posn-string (event-start event)))))) + (persp-switch (format "%s" (car (posn-string (event-start event))))) + ;; XXX: Force update of modestring because otherwise it's inconsistent with + ;; the order of perspectives maintained by persp-sort. The call to + ;; persp-update-modestring inside persp-switch happens too early. + (persp-update-modestring)) (defun persp-mode-line () "Return the string displayed in the modeline representing the perspectives." @@ -674,7 +678,8 @@ If NORECORD is non-nil, do not update the (persp-switch (nth (- num 1) persps)) (message "Perspective %s not available, there are only %s" num max-persps))) ;; XXX: Have to force the modestring to update in this case, since the call - ;; inside persp-switch happens too early. + ;; inside persp-switch happens too early. Otherwise, it may be inconsistent + ;; with persp-sort. (persp-update-modestring)) (defun persp-activate (persp) |
