branch: externals/vertico commit e826dfcb14af5e2cfd88ed110d0208ddc2d37788 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
vertico-buffer: Do not override mode-line-format if nil Fix #529 --- extensions/vertico-buffer.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/extensions/vertico-buffer.el b/extensions/vertico-buffer.el index 16496287f0..f58d804704 100644 --- a/extensions/vertico-buffer.el +++ b/extensions/vertico-buffer.el @@ -146,11 +146,12 @@ face-remapping-alist (copy-tree `((mode-line-inactive mode-line) ,@face-remapping-alist)) mode-line-format - (list (format #(" %s%s " 1 3 (face mode-line-buffer-id)) - (replace-regexp-in-string ":? *\\'" "" - (minibuffer-prompt)) - (let ((depth (recursion-depth))) - (if (< depth 2) "" (format " [%s]" depth))))) + (when mode-line-format ;; Do not override if nil + (list (format #(" %s%s " 1 3 (face mode-line-buffer-id)) + (replace-regexp-in-string ":? *\\'" "" + (minibuffer-prompt)) + (let ((depth (recursion-depth))) + (if (< depth 2) "" (format " [%s]" depth)))))) vertico-count (- (/ (window-pixel-height win) (default-line-height)) 2)))) (set-window-parameter win 'no-other-window t)