branch: master
commit 28e9416fe570b8b56eff2c394bf015ae0fda6001
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el (ivy--input): Fix for ediff
    
    With M-x `ediff', `line-end-position' returns e.g. 81 when it should return 
82 instead.
    To fix it, set `inhibit-field-text-motion'.
    
    Fixes #2175
---
 ivy.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index f1ffd66..67b9379 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2793,9 +2793,10 @@ tries to ensure that it does not change depending on the 
number of candidates."
   ;; assume one-line minibuffer input
   (save-excursion
     (goto-char (minibuffer-prompt-end))
-    (buffer-substring-no-properties
-     (point)
-     (line-end-position))))
+    (let ((inhibit-field-text-motion t))
+      (buffer-substring-no-properties
+       (point)
+       (line-end-position)))))
 
 (defun ivy--minibuffer-cleanup ()
   "Delete the displayed completion candidates."

Reply via email to