diff options
author | Juri Linkov <juri@linkov.net> | 2021-10-03 20:13:29 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2021-10-03 20:13:29 +0300 |
commit | 931a7276c036c25b5cde8971a3b0cb65873156b2 (patch) | |
tree | 7a65eccb4b0e8c9a8e96e76d66d72469e3fde96e /lisp | |
parent | 3863919a00e5f6c7cf9d4fe9e1b1a96fd5c18173 (diff) | |
download | emacs-931a7276c036c25b5cde8971a3b0cb65873156b2.tar.gz emacs-931a7276c036c25b5cde8971a3b0cb65873156b2.tar.bz2 emacs-931a7276c036c25b5cde8971a3b0cb65873156b2.zip |
* lisp/tab-line.el (tab-line-format): Add face-modified to the cache key.
When tab-line-tab-face-functions contains tab-line-tab-face-modified,
add 'buffer-modified-p' status to the cache-key, so the cache will expire
when the buffer modification status will change.
https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg00129.html
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/tab-line.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 4a751b384e5..890d1243e73 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -574,7 +574,10 @@ For use in `tab-line-tab-face-functions'." ;; handle tab-line scrolling (window-parameter nil 'tab-line-hscroll) ;; for setting face 'tab-line-tab-current' - (eq (selected-window) (old-selected-window)))) + (eq (selected-window) (old-selected-window)) + (and (memq 'tab-line-tab-face-modified + tab-line-tab-face-functions) + (buffer-file-name) (buffer-modified-p)))) (cache (window-parameter nil 'tab-line-cache))) ;; Enable auto-hscroll again after it was disabled on manual scrolling. ;; The moment to enable it is when the window-buffer was updated. |