From d2ecd877395e3f2c413feccfe775b2af006801a9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Aug 2018 03:31:20 +0200 Subject: [PATCH] Fix ivy completion when treemacs is open Caused by incorrectly initialized treemacs popup hack. --- modules/ui/popup/+hacks.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 1c3266159..499d3d84a 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -284,10 +284,12 @@ instead of switch-to-buffer-*." ;; `treemacs' (after! treemacs - (set-popup-rule! "^ \\*Treemacs" :side 'left :size treemacs-width :quit nil) + (set-popup-rule! "^ \\*Treemacs" :side 'left :size treemacs-width :quit nil :ttl 0) (defun +popup*set-popup (&rest _) - (+popup--init (selected-window))) - (advice-add #'treemacs--setup-buffer :after #'+popup*set-popup)) + "Create and setup a buffer for treemacs in the right position and size." + (pop-to-buffer (treemacs--get-framelocal-buffer)) + (treemacs--forget-last-highlight)) + (advice-add #'treemacs--setup-buffer :override #'+popup*set-popup)) ;; `wgrep'