File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -743,12 +743,17 @@ text property `cider-old-input'."
743
743
744
744
(defvar cider-repl-clear-buffer-hook )
745
745
746
+ (defun cider-repl--clear-region (start end )
747
+ " Delete the output and its overlays between START and END."
748
+ (mapc 'delete-overlay (overlays-in start end))
749
+ (delete-region start end))
750
+
746
751
(defun cider-repl-clear-buffer ()
747
752
" Delete the output generated by the Clojure process."
748
753
(interactive )
749
754
(let ((inhibit-read-only t ))
750
- (delete -region (point-min ) cider-repl-prompt-start-mark)
751
- (delete -region cider-repl-output-start cider-repl-output-end)
755
+ (cider-repl--clear -region (point-min ) cider-repl-prompt-start-mark)
756
+ (cider-repl--clear -region cider-repl-output-start cider-repl-output-end)
752
757
(when (< (point ) cider-repl-input-start-mark)
753
758
(goto-char cider-repl-input-start-mark))
754
759
(recenter t ))
@@ -773,7 +778,7 @@ With a prefix argument CLEAR-REPL it will clear the entire REPL buffer instead."
773
778
(end (cider-repl--end-of-line-before-input-start)))
774
779
(when (< start end)
775
780
(let ((inhibit-read-only t ))
776
- (delete -region start end)
781
+ (cider-repl--clear -region start end)
777
782
(save-excursion
778
783
(goto-char start)
779
784
(insert
You can’t perform that action at this time.
0 commit comments