From 6d218fc5a0b20470c8c133c64ed386dde09cf538 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 2 Jun 2018 10:53:51 +0200 Subject: [PATCH] Consider magit buffers real So they can be switched to if buried --- modules/tools/magit/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 488d4a7a5..e9d96b972 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -23,6 +23,12 @@ load everything.") magit-revision-show-gravatars '("^Author: " . "^Commit: ")) (set! :popup "^\\(?:\\*magit\\|magit:\\)" :ignore) + + ;; Consider magit buffers real (so they can switched to) + (defun +magit-buffer-p (buf) + (with-current-buffer buf (derived-mode-p 'magit-mode))) + (add-to-list 'doom-real-buffer-functions #'+magit-buffer-p nil #'eq) + ;; no mode-line in magit popups (add-hook 'magit-popup-mode-hook #'hide-mode-line-mode) ;; Clean up after magit by properly killing buffers