@@ -1177,28 +1177,17 @@ If SELECT is non-nil, select the BUFFER."
1177
1177
(-when-let (win (get-buffer-window buffer))
1178
1178
(with-current-buffer buffer
1179
1179
(set-window-point win (point ))))
1180
+ ; ; Non nil `inhibit-same-window' ensures that current window is not covered
1180
1181
(if select
1181
- ; ; There is a quirk with `display-buffer-in-previous-window' which
1182
- ; ; overrides current buffer with *cider-error* buffer if *cider-error* was
1183
- ; ; most recently displayed in current buffer's window. The
1184
- ; ; `inhibit-same-window' solution below inhibits
1185
- ; ; `display-buffer-in-previous-window' altogether and allows
1186
- ; ; `display-buffer-use-some-window' to run instead, which in turn doesn't
1187
- ; ; behave that nicely on splits with more than 3 buffers. When
1188
- ; ; `pop-up-windows' is nil, non-nil `inhibit-same-window' pops up a new
1189
- ; ; frame if there is only one buffer in a frame. The
1190
- ; ; `display-buffer-in-previous-window' issue should be followed upstream,
1191
- ; ; but for now the solution below should satisfy all needs with only minor
1192
- ; ; inconvenience on frames with 3 buffer splits.
1193
1182
(pop-to-buffer buffer `(nil . ((inhibit-same-window . , pop-up-windows ))))
1194
1183
(display-buffer buffer `(nil . ((inhibit-same-window . , pop-up-windows )))))
1195
1184
buffer)
1196
1185
1197
- (defun cider-popup-buffer-quit (&optional kill-buffer-p )
1198
- " Quit the current (temp) window and bury its buffer using `quit-window' .
1199
- If prefix argument KILL-BUFFER-P is non-nil, kill the buffer instead of burying it."
1186
+ (defun cider-popup-buffer-quit (&optional kill )
1187
+ " Quit the current (temp) window and bury its buffer using `quit-restore- window' .
1188
+ If prefix argument KILL is non-nil, kill the buffer instead of burying it."
1200
1189
(interactive )
1201
- (quit-window kill-buffer-p (selected-window )))
1190
+ (quit-restore- window (selected-window ) ( if kill 'kill 'append )))
1202
1191
1203
1192
(defun cider-make-popup-buffer (name &optional mode )
1204
1193
" Create a temporary buffer called NAME using major MODE (if specified)."
0 commit comments