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

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

[elpa] externals-release/ement 8b295133ff 2/4: Fix: (ement-room-list) Re


From: ELPA Syncer
Subject: [elpa] externals-release/ement 8b295133ff 2/4: Fix: (ement-room-list) Restore point on refresh
Date: Tue, 16 May 2023 02:58:22 -0400 (EDT)

branch: externals-release/ement
commit 8b295133ff4729864329a13a11091c9b0c61a42d
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: (ement-room-list) Restore point on refresh
---
 README.org         | 3 ++-
 ement-room-list.el | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 2f607bcd4b..3e0d69c367 100644
--- a/README.org
+++ b/README.org
@@ -298,7 +298,8 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 
 ** 0.9.2-pre
 
-Nothing new yet.
+*Fixes*
++ Restore position in room list when refreshing.
 
 ** 0.9.1
 
diff --git a/ement-room-list.el b/ement-room-list.el
index bbdbfa69c8..49a8d9ddde 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -548,7 +548,7 @@ BUFFER-NAME and is shown with DISPLAY-BUFFER-ACTION; or if
 DISPLAY-BUFFER-ACTION is nil, the buffer is not displayed."
   (interactive)
   (let ((inhibit-read-only t)
-        format-table column-sizes window-start room-session-vectors)
+        pos format-table column-sizes window-start room-session-vectors)
     (cl-labels (;; (heading-face
                 ;;  (depth) (list :inherit (list 'bufler-group 
(bufler-level-face depth))))
                 (format-item (item) (gethash item format-table))
@@ -621,6 +621,7 @@ DISPLAY-BUFFER-ACTION is nil, the buffer is not displayed."
                      append (cl-loop for room in (ement-session-rooms session)
                                      collect (vector room session))))
       (with-current-buffer (get-buffer-create buffer-name)
+        (setf pos (point))
         (ement-room-list-mode)
         (delete-all-overlays)
         (erase-buffer)
@@ -660,7 +661,6 @@ DISPLAY-BUFFER-ACTION is nil, the buffer is not displayed."
                  (taxy-magit-section-insert-indent-items nil)
                  (format-cons (taxy-magit-section-format-items
                                ement-room-list-columns 
ement-room-list-column-formatters taxy))
-                 (pos (point))
                  (section-ident (when (magit-current-section)
                                   (magit-section-ident 
(magit-current-section)))))
             (setf format-table (car format-cons)



reply via email to

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