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

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

[nongnu] elpa/inf-ruby 673d6b66b0 064/265: Do Bond completion in the mid


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 673d6b66b0 064/265: Do Bond completion in the middle of the line
Date: Sat, 9 Jul 2022 21:59:14 -0400 (EDT)

branch: elpa/inf-ruby
commit 673d6b66b0dfec7e4c0b10125fb0d5b8be82912c
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    Do Bond completion in the middle of the line
---
 inf-ruby.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index dab42c6db7..ec3f9278a7 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -365,7 +365,8 @@ The reason for this is unknown. Remove this line from 
`completions'."
 (defun inf-ruby-completions (expr)
   "Return a list of completions for the Ruby expression starting with EXPR."
   (let* ((proc (inf-ruby-proc))
-         (line (replace-regexp-in-string "\n$" "" (thing-at-point 'line)))
+         (line (buffer-substring (save-excursion (beginning-of-thing 'line))
+                                 (point)))
         (comint-filt (process-filter proc))
         (kept "") completions)
     (set-process-filter proc (lambda (proc string) (setq kept (concat kept 
string))))



reply via email to

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