Prevent cider-quit from leaving duplicate windows

This commit is contained in:
David Morgan 2023-08-15 16:37:19 +01:00
parent 258eb955c7
commit f04b9afcfc
Signed by: djm
GPG Key ID: C171251002C200F2
1 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,12 @@
(list beg end (completion-table-dynamic (lambda (_) completion))
:annotation-function #'cider-annotate-symbol))))
(advice-add 'cider-complete-at-point :override 'my/cider-complete-at-point)
(defun fix-duplicate-windows ()
"When all windows are the same, delete all of them except the current one."
(when (apply #'eq (mapcar 'window-buffer (window-list)))
(delete-other-windows)))
(advice-add #'cider-close-ancillary-buffers :after #'fix-duplicate-windows)
:bind
(:map cider-mode-map
("C-c M-l" . cider-load-file)