summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-12-24 20:04:56 +0200
committerJuri Linkov <juri@linkov.net>2022-12-24 20:04:56 +0200
commit4dc5bee98d5734b4f7113b961bafead1eb091bd0 (patch)
tree537b7502678d27ae6498dca551952b5d88dceaa2
parent1748361c68aeb3e18e6007369f153657227e6059 (diff)
downloademacs-4dc5bee98d5734b4f7113b961bafead1eb091bd0.tar.gz
* lisp/tab-bar.el: Fix the recent removal of substring as a gv-place.
(tab-bar-auto-width): Copy more logic from 'cl--set-substring' (bug#60297).
-rw-r--r--lisp/tab-bar.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 0bab3aba801..7433f5c8e51 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1116,7 +1116,8 @@ tab bar might wrap to the second line when it shouldn't.")
(del-pos2 (if close-p -1 nil)))
(while continue
(setq name (concat (substring name 0 del-pos1)
- (substring name del-pos2)))
+ (and del-pos2
+ (substring name del-pos2))))
(setq curr-width (string-pixel-width name))
(if (and (> curr-width width)
(< curr-width prev-width))