[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr b0fa40439b 3/4: tabulated view: Restore point at th
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr b0fa40439b 3/4: tabulated view: Restore point at the end of buffer when refreshing |
Date: |
Tue, 28 Jun 2022 04:58:03 -0400 (EDT) |
branch: externals/tmr
commit b0fa40439bf0495c73ab88ce072e22321118964a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>
tabulated view: Restore point at the end of buffer when refreshing
---
tmr-tabulated.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tmr-tabulated.el b/tmr-tabulated.el
index bfa5cb7303..8dad902646 100644
--- a/tmr-tabulated.el
+++ b/tmr-tabulated.el
@@ -86,9 +86,12 @@
(lambda ()
(if (buffer-live-p buf)
(with-current-buffer buf
- (if (get-buffer-window)
- (progn
- (revert-buffer)
+ (if-let (win (get-buffer-window))
+ (with-selected-window win
+ (let ((end (eobp)))
+ (revert-buffer)
+ (when end
+ (goto-char (point-max))))
;; HACK: For some reason the hl-line
highlighting gets lost here
(when (and (bound-and-true-p global-hl-line-mode)
(fboundp 'global-hl-line-highlight))