From 92e4a74fdcc6add0acd6e7bb3eff397eb9966b66 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 11 Mar 2021 00:30:50 +0000 Subject: jao-minibuffer: stop making pdf-tools angry --- init.org | 10 ---------- lib/eos/jao-minibuffer.el | 7 ++++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/init.org b/init.org index d92b8ad..130da2d 100644 --- a/init.org +++ b/init.org @@ -1537,16 +1537,6 @@ (require 'pdf-tools) - (defun jao--refocus (&rest _i) (other-window 1) (other-window -1)) - - (advice-add 'pdf-view-previous-line-or-previous-page :after #'jao--refocus) - (advice-add 'pdf-view-scroll-up-or-next-page :after #'jao--refocus) - (advice-add 'pdf-view-scroll-down-or-previous-page :after #'jao--refocus) - - ;; (advice-remove 'pdf-view-previous-line-or-previous-page #'jao--refocus) - ;; (advice-remove 'pdf-view-scroll-up-or-next-page #'jao--refocus) - ;; (advice-remove 'pdf-view-scroll-down-or-previous-page #'jao--refocus) - (use-package saveplace-pdf-view :ensure t) diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index 91662bf..777980e 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -84,9 +84,10 @@ " " msg))))) (defun jao-minibuffer--insert (msg) - (with-current-buffer jao-minibuffer--name - (erase-buffer) - (insert msg))) + (save-window-excursion + (with-current-buffer jao-minibuffer--name + (erase-buffer) + (insert msg)))) ;;;###autoload (defun jao-minibuffer-refresh () -- cgit v1.2.3