branch: externals/detached
commit 10cf1203831bdcfebb8a6de497602371dd6138d8
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Bug fix: Address bugs in detached--db-directory-event
---
detached.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/detached.el b/detached.el
index 4f76cef42c..1f7b18bd47 100644
--- a/detached.el
+++ b/detached.el
@@ -1278,10 +1278,11 @@ session and trigger a state transition."
If event is cased by an update to the `detached' database, re-initialize
`detached--sessions'."
(pcase-let* ((`(,_descriptor ,action ,file) event)
- (database-updated (and (string= "detached.db" file)
- (eq 'attribute-changed action))))
- (when database-updated)
- (detached--db-initialize)))
+ (database-updated (and (string-match "detached.db$" file)
+ (or (eq 'attribute-changed action)
+ (eq 'changed action)))))
+ (when database-updated
+ (detached--db-initialize))))
(defun detached--annotation-widths (sessions annotation-format)
"Return widths for ANNOTATION-FORMAT based on SESSIONS."