diff --git a/centaur-tabs.el b/centaur-tabs.el index 6e22095..4de0d06 100644 --- a/centaur-tabs.el +++ b/centaur-tabs.el @@ -924,23 +924,24 @@ element." ;; At this point the selected tab is the last elt in ELTS. ;; Scroll TABSET and ELTS until the selected tab becomes ;; visible. - (with-temp-buffer - (let ((truncate-partial-width-windows nil) - (inhibit-modification-hooks t) - deactivate-mark ;; Prevent deactivation of the mark! - start) - (setq truncate-lines nil - buffer-undo-list t) - (setq start (point)) - (while (and (cdr elts) ;; Always show the selected tab! - (progn - (delete-region start (point-max)) - (goto-char (point-max)) - (apply #'insert elts) - (goto-char (point-min)) - (> (vertical-motion 1) 0))) - (centaur-tabs-scroll tabset 1) - (setq elts (cdr elts))))) + (let (buffer-list-update-hook) + (with-temp-buffer + (let ((truncate-partial-width-windows nil) + (inhibit-modification-hooks t) + deactivate-mark ;; Prevent deactivation of the mark! + start) + (setq truncate-lines nil + buffer-undo-list t) + (setq start (point)) + (while (and (cdr elts) ;; Always show the selected tab! + (progn + (delete-region start (point-max)) + (goto-char (point-max)) + (apply #'insert elts) + (goto-char (point-min)) + (> (vertical-motion 1) 0))) + (centaur-tabs-scroll tabset 1) + (setq elts (cdr elts)))))) (setq elts (nreverse elts)) (setq centaur-tabs--track-selected nil)) ;; Format remaining tabs.