Change: (ement-taxy-auto-update) Don't refresh when region is active

Thanks to @kushal:locationd.net for reporting.
This commit is contained in:
Adam Porter 2022-09-18 11:29:12 -05:00
parent 75441f919b
commit f088b24a29
2 changed files with 10 additions and 5 deletions

View file

@ -283,6 +283,7 @@ Note that, while ~matrix-client~ remains usable, and probably will for some time
*Changes*
+ Read receipts are re-enabled. (They're now implemented with a global idle timer rather than ~window-scroll-functions~, which sometimes caused a strange race condition that could cause Emacs to become unresponsive or crash.)
+ When determining whether a room is considered unread, non-message events like membership changes, reactions, etc. are ignored. This fixes a bug that caused certain rooms that had no message events (like some bridged rooms) to appear as unread when they shouldn't have. But it's unclear whether this is always preferable (e.g. one might want a member leaving a room to cause it to be marked unread), so this is classified as a change rather than simply a fix, and more improvements may be made to this in the future. (Fixes [[https://github.com/alphapapa/ement.el/issues/97][#97]]. Thanks to [[https://github.com/MrRoy][Julien Roy]] for reporting and testing.)
+ The ~ement-taxy-room-list~ view no longer automatically refreshes the list if the region is active in the buffer. (This allows the user to operate on multiple rooms without the contents of the buffer changing before completing the process.)
*Fixes*
+ Links to only rooms (as opposed to links to events in rooms) may be activated to join them.

View file

@ -588,11 +588,15 @@ left."
(when (and ement-taxy-auto-update
(buffer-live-p (get-buffer "*Ement Taxy*")))
(with-current-buffer (get-buffer "*Ement Taxy*")
;; FIXME: This seems to redisplay the buffer even when it's buried. But it
;; shouldn't, because the revert function uses `display-buffer-no-window'. But it
;; doesn't always happen; it only seems to in certain circumstances, e.g. when the
;; minibuffer is open, which should be unrelated to this.
(revert-buffer))))
(unless (region-active-p)
;; Don't refresh the list if the region is active (e.g. if the user is trying to
;; operate on multiple rooms).
;; FIXME: This seems to redisplay the buffer even when it's buried. But it
;; shouldn't, because the revert function uses `display-buffer-no-window'. But it
;; doesn't always happen; it only seems to in certain circumstances, e.g. when the
;; minibuffer is open, which should be unrelated to this.
(revert-buffer)))))
;;;; Footer