branch: externals/tmr commit 711616ea7588cf7b260a49ede9ac081dbca953b6 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Optimize tabulated refreshing This should reduce the memory allocations and hopefully improve the negative side effects of the refreshing (point movement etc) --- tmr-tabulated.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmr-tabulated.el b/tmr-tabulated.el index 8dad902646..9566e11675 100644 --- a/tmr-tabulated.el +++ b/tmr-tabulated.el @@ -89,7 +89,10 @@ (if-let (win (get-buffer-window)) (with-selected-window win (let ((end (eobp))) - (revert-buffer) + ;; Optimized refreshing + (dolist (entry tabulated-list-entries) + (setf (aref (cadr entry) 2) (tmr--format-remaining (car entry)))) + (tabulated-list-print t t) (when end (goto-char (point-max)))) ;; HACK: For some reason the hl-line highlighting gets lost here