emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/detached b8cb479813 1/5: Refresh list of sessions when


From: ELPA Syncer
Subject: [elpa] externals/detached b8cb479813 1/5: Refresh list of sessions when switch to buffer
Date: Fri, 14 Oct 2022 14:57:31 -0400 (EDT)

branch: externals/detached
commit b8cb47981381e2c3c05b60d06cce3a4a0bca807b
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Refresh list of sessions when switch to buffer
---
 detached-list.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/detached-list.el b/detached-list.el
index 517f31e2f1..369fd1f5ea 100644
--- a/detached-list.el
+++ b/detached-list.el
@@ -530,6 +530,10 @@ If prefix-argument is provided unmark instead of mark."
 
 ;;;; Support functions
 
+(defun detached--revert-selection-change (&rest _)
+  "Revert function to add to `window-selection-change-functions'."
+  (detached-list-revert))
+
 (defun detached-list--initialize-directory (directory)
   "Initialize sessions in DIRECTORY."
   (thread-last (detached-get-sessions)
@@ -711,6 +715,7 @@ If prefix-argument is provided unmark instead of mark."
   (hl-line-mode)
   (add-hook 'eldoc-documentation-functions #'detached-list-eldoc nil t)
   (add-hook 'tabulated-list-revert-hook #'detached-list--revert-sessions nil t)
+  (add-hook 'window-selection-change-functions 
#'detached--revert-selection-change nil t)
   (setq-local mode-line-position '((:eval 
(detached-list--mode-line-indicator))))
   (tabulated-list-init-header))
 



reply via email to

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