branch: externals/tmr commit b0fa40439bf0495c73ab88ce072e22321118964a Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Protesilaos Stavrou <i...@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))