branch: elpa/idris-mode
commit 9f4d497e685950b36b5cb6f83dabe7dfd91a96ae
Author: Marek L <[email protected]>
Commit: Marek L <[email protected]>
Do not try delete last window when deleting idris buffer
Why:
In tests (batch mode) this may lead to error:
"Attempt to delete minibuffer or sole ordinary window"
and cause test failure
---
idris-common-utils.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/idris-common-utils.el b/idris-common-utils.el
index 0af862df57..935116ad87 100644
--- a/idris-common-utils.el
+++ b/idris-common-utils.el
@@ -77,7 +77,7 @@ Lisp package.")
(when (and buf (buffer-live-p buf))
(let ((win (get-buffer-window buf)))
(kill-buffer buf)
- (when (null (window-prev-buffers win))
+ (when (and (null (window-prev-buffers win)) (< 1 (length
(window-list))))
(delete-window win))))
(when return-buffer (pop-to-buffer return-buffer
`(display-buffer-reuse-window)))))