From 54a5f45182f123711d3a9432301fc27b06afc6cd Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 24 Jan 2019 15:26:51 +0800 Subject: [PATCH] Fix #102: The nyan-cat indicator respects nyan-minimum-window-width. --- doom-modeline-segments.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 279fcd3..f90d4b7 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -63,6 +63,7 @@ (defvar mc/mode-line) (defvar minions-mode) (defvar minions-mode-line-lighter) +(defvar nyan-minimum-window-width) (defvar persp-nil-name) (defvar symbol-overlay-keywords-alist) (defvar symbol-overlay-temp-symbol) @@ -1243,7 +1244,8 @@ See `mode-line-percent-position'.") " %l") (column-number-mode (doom-modeline-column-zero-based " :%c" " :%C"))))) (if (and (bound-and-true-p nyan-mode) - (doom-modeline--active)) + (doom-modeline--active) + (>= (window-width) nyan-minimum-window-width)) (concat " " (nyan-create) " " (propertize (format-mode-line lc) 'help-echo "Buffer position\n\