summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.org10
-rw-r--r--lib/eos/jao-minibuffer.el7
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 ()