emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/bash-completion 35d38fd3dc 295/313: Workaround for output


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 35d38fd3dc 295/313: Workaround for output containing \r\n instead of \n.
Date: Sat, 3 Dec 2022 10:59:39 -0500 (EST)

branch: elpa/bash-completion
commit 35d38fd3dc4d30fb177b9a6b858e2dedfc5b671a
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>

    Workaround for output containing \r\n instead of \n.
    
    This change filters out any \r that might be output when in
    single-process mode.
---
 bash-completion.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bash-completion.el b/bash-completion.el
index 802cfa0219..8a492884bd 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -1441,6 +1441,10 @@ and would like bash completion in Emacs to take these 
changes into account."
     (let ((begin (point-max)))
       (goto-char begin)
       (insert output)
+      (save-excursion
+        (goto-char (point-min))
+        (while (search-forward "\r" nil 'noerror)
+          (delete-char -1)))
       (ansi-color-filter-region begin (point))
       "")))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]