mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
emacs: guard against empty string in prot-modeline--string-truncate-p
This commit is contained in:
parent
e2908a9452
commit
f3a1616a9d
|
|
@ -12791,9 +12791,11 @@ package).")
|
|||
|
||||
(defun prot-modeline--string-truncate-p (str)
|
||||
"Return non-nil if STR should be truncated."
|
||||
(and (prot-common-window-narrow-p)
|
||||
(> (length str) prot-modeline-string-truncate-length)
|
||||
(not (one-window-p :no-minibuffer))))
|
||||
(if (string-empty-p str)
|
||||
str
|
||||
(and (prot-common-window-narrow-p)
|
||||
(> (length str) prot-modeline-string-truncate-length)
|
||||
(not (one-window-p :no-minibuffer)))))
|
||||
|
||||
(defun prot-modeline--truncate-p ()
|
||||
"Return non-nil if truncation should happen.
|
||||
|
|
|
|||
|
|
@ -192,9 +192,11 @@ package).")
|
|||
|
||||
(defun prot-modeline--string-truncate-p (str)
|
||||
"Return non-nil if STR should be truncated."
|
||||
(and (prot-common-window-narrow-p)
|
||||
(> (length str) prot-modeline-string-truncate-length)
|
||||
(not (one-window-p :no-minibuffer))))
|
||||
(if (string-empty-p str)
|
||||
str
|
||||
(and (prot-common-window-narrow-p)
|
||||
(> (length str) prot-modeline-string-truncate-length)
|
||||
(not (one-window-p :no-minibuffer)))))
|
||||
|
||||
(defun prot-modeline--truncate-p ()
|
||||
"Return non-nil if truncation should happen.
|
||||
|
|
|
|||
Loading…
Reference in a new issue