[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 43982a8: Don't infloop in comint-redirect-results-list-from-proce
From: |
Lars Ingebrigtsen |
Subject: |
master 43982a8: Don't infloop in comint-redirect-results-list-from-process |
Date: |
Mon, 18 Jan 2021 23:13:15 -0500 (EST) |
branch: master
commit 43982a8f1017f709f78d5722796c266d4f72de05
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Don't infloop in comint-redirect-results-list-from-process
* lisp/comint.el (comint-redirect-results-list-from-process):
Ensure forward progress (bug#45950).
---
lisp/comint.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/comint.el b/lisp/comint.el
index 53153af..e52d67d 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -3863,7 +3863,11 @@ REGEXP-GROUP is the regular expression group in REGEXP
to use."
(push (buffer-substring-no-properties
(match-beginning regexp-group)
(match-end regexp-group))
- results))
+ results)
+ (when (zerop (length (match-string 0)))
+ ;; If the regexp can be empty (for instance, "^.*$"), we
+ ;; don't advance, so ensure forward progress.
+ (forward-line 1)))
(nreverse results))))
;; Converting process modes to use comint mode
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 43982a8: Don't infloop in comint-redirect-results-list-from-process,
Lars Ingebrigtsen <=