summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index 48aa652..6394b03 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1539,10 +1539,12 @@ INITIAL-INTERVAL: Initial interval for notes of deck"
(cl-defun gnosis-edit-save-exit (&optional exit-func &rest args)
"Save edits and exit using EXIT-FUNC, with ARGS."
(interactive)
- (eval-buffer)
- (quit-window t)
- (when exit-func
- (apply exit-func args)))
+ (when (get-buffer "*gnosis-edit*")
+ (switch-to-buffer "*gnosis-edit*")
+ (eval-buffer)
+ (quit-window t)
+ (when exit-func
+ (apply exit-func args))))
(defvar-keymap gnosis-edit-mode-map
:doc "gnosis-edit keymap"