emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4dc5bee98d: * lisp/tab-bar.el: Fix the recent removal of substrin


From: Juri Linkov
Subject: master 4dc5bee98d: * lisp/tab-bar.el: Fix the recent removal of substring as a gv-place.
Date: Sat, 24 Dec 2022 13:05:16 -0500 (EST)

branch: master
commit 4dc5bee98d5734b4f7113b961bafead1eb091bd0
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * 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).
---
 lisp/tab-bar.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 0bab3aba80..7433f5c8e5 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]