diff options
author | Juri Linkov <juri@linkov.net> | 2023-09-19 20:51:07 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2023-09-19 20:51:07 +0300 |
commit | 74dffcdf4f25ce4dc9074b0215f9967fb3e245a5 (patch) | |
tree | db6cc4cdddb614fd777649f875c75a486bd9bef9 /lisp/tab-bar.el | |
parent | 3c14cab797752e78c21ac2a69a7e854276802c22 (diff) | |
download | emacs-74dffcdf4f25ce4dc9074b0215f9967fb3e245a5.tar.gz |
* lisp/tab-bar.el (tab-bar-auto-width): Don't check if width changes.
Remove the condition '(< curr-width prev-width)' that was intended to check
if the width stopped to change. But actually it's not only unneeded,
but causes a bug: when the name contains a combining character, then
the width doesn't change, and the name truncation stops too early.
Diffstat (limited to 'lisp/tab-bar.el')
-rw-r--r-- | lisp/tab-bar.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index e4379b97d8b..d2815c03ebf 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1234,8 +1234,7 @@ tab bar might wrap to the second line when it shouldn't.") space (substring name ins-pos))) (setq curr-width (string-pixel-width name)) - (if (and (< curr-width width) - (> curr-width prev-width)) + (if (< curr-width width) (setq prev-width curr-width prev-name name) ;; Set back a shorter name @@ -1249,8 +1248,7 @@ tab bar might wrap to the second line when it shouldn't.") (and del-pos2 (substring name del-pos2)))) (setq curr-width (string-pixel-width name)) - (if (and (> curr-width width) - (< curr-width prev-width)) + (if (> curr-width width) (setq prev-width curr-width) (setq continue nil))) (let* ((len (length name)) |