Skip to content

Commit 5ef6bdf

Browse files
arichiardibbatsov
authored andcommitted
Revert "Remove unwanted ansi chars from the REPL output"
This reverts commit a36d2a0.
1 parent cfad839 commit 5ef6bdf

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

inf-clojure.el

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ to continue it."
344344
(setq comint-input-filter #'inf-clojure-input-filter)
345345
(setq-local comint-prompt-read-only inf-clojure-prompt-read-only)
346346
(add-hook 'comint-preoutput-filter-functions #'inf-clojure-preoutput-filter nil t)
347-
(add-hook 'comint-output-filter-functions 'inf-clojure--ansi-filter)
348347
(add-hook 'completion-at-point-functions #'inf-clojure-completion-at-point nil t)
349348
(ansi-color-for-comint-mode-on))
350349

@@ -369,19 +368,6 @@ to continue it."
369368
"Remove subprompts from STRING."
370369
(replace-regexp-in-string inf-clojure-subprompt "" string))
371370

372-
(defconst inf-clojure--ansi-clear-line "\\[1G\\|\\[0J\\|\\[13G"
373-
"Ansi codes sent by the lumo repl that we need to clear." )
374-
375-
(defun inf-clojure--ansi-filter (string)
376-
"Filter unwanted ansi character from STRING."
377-
(save-excursion
378-
;; go to start of first line just inserted
379-
(comint-goto-process-mark)
380-
(goto-char (max (point-min) (- (point) (string-width string))))
381-
(forward-line 0)
382-
(while (re-search-forward inf-clojure--ansi-clear-line nil t)
383-
(replace-match ""))))
384-
385371
(defun inf-clojure-preoutput-filter (str)
386372
"Preprocess the output STR from interactive commands."
387373
(cond

0 commit comments

Comments
 (0)