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

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

[nongnu] elpa/inf-ruby 68a7ad32fa 006/265: Bugfix: Don't stall Emacs whe


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 68a7ad32fa 006/265: Bugfix: Don't stall Emacs when there is no valid completion output.
Date: Sat, 9 Jul 2022 21:59:09 -0400 (EDT)

branch: elpa/inf-ruby
commit 68a7ad32fa75db32f980c254d15d89cd1342bf64
Author: Cornelius Mika <cornelius.mika@gmail.com>
Commit: Cornelius Mika <cornelius.mika@gmail.com>

    Bugfix: Don't stall Emacs when there is no valid completion output.
---
 inf-ruby.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index d389bf10de..fddbdccb58 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -329,7 +329,8 @@ Then switch to the process buffer."
     (set-process-filter proc (lambda (proc string) (setf kept (concat kept 
string))))
     (process-send-string proc (format "puts 
IRB::InputCompletor::CompletionProc.call('%s').compact\n"
                                       (ruby-escape-single-quoted seed)))
-    (while (not (string-match inf-ruby-prompt-pattern kept)) 
(accept-process-output proc))
+    (while (and (not (string-match inf-ruby-prompt-pattern kept))
+                (accept-process-output proc 2)))
     (if (string-match "^[[:alpha:]]+?Error: " kept) (error kept))
     (setf completions (cdr (butlast (split-string kept "[\r\n]") 2)))
     (set-process-filter proc comint-filt)



reply via email to

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