From 6293c63924732f4b5592a8ca580192df2504c159 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Mon, 10 Jun 2019 16:03:48 +0800 Subject: [PATCH] Fix #185: doom-modeline breaks query-replace. --- doom-modeline-segments.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index e013e50..dc77615 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -327,15 +327,16 @@ Uses `all-the-icons-material' to fetch the icon." (defun doom-modeline-update-buffer-file-name (&rest _) "Update buffer file name in mode-line." (setq doom-modeline--buffer-file-name - (if buffer-file-name - (doom-modeline-buffer-file-name) - (propertize "%b" - 'face (if (doom-modeline--active) - 'doom-modeline-buffer-file - 'mode-line-inactive) - 'help-echo "Buffer name + (save-match-data + (if buffer-file-name + (doom-modeline-buffer-file-name) + (propertize "%b" + 'face (if (doom-modeline--active) + 'doom-modeline-buffer-file + 'mode-line-inactive) + 'help-echo "Buffer name mouse-1: Previous buffer\nmouse-3: Next buffer" - 'local-map mode-line-buffer-identification-keymap)))) + 'local-map mode-line-buffer-identification-keymap))))) (add-hook 'find-file-hook #'doom-modeline-update-buffer-file-name) (add-hook 'after-revert-hook #'doom-modeline-update-buffer-file-name) (add-hook 'after-save-hook #'doom-modeline-update-buffer-file-name)