branch: master
commit db94a12d82c6ad4a8adb64d20c1bd148083e9c89
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-completion-in-region): Fix double insert bug
Ensure that the already insert string, e.g. "js-indent-le" is deleted,
before the full symbol "js-indent-level" is inserted.
This used to work only sometimes before.
Fixes #528
---
ivy.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ivy.el b/ivy.el
index 24bfe41..5df305d 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1670,6 +1670,8 @@ The previous string is between `ivy-completion-beg' and
`ivy-completion-end'."
(if (string= str (car comps))
(message "Sole match")
(setf (ivy-state-window ivy-last) (selected-window))
+ (setq ivy-completion-beg start)
+ (setq ivy-completion-end end)
(ivy-completion-in-region-action
(substring-no-properties
(car comps))))