branch: externals/capf-autosuggest
commit 9fb8c7e7a5e56fa9604819568e6f8e6b1dd1a443
Author: jakanakaevangeli <[email protected]>
Commit: jakanakaevangeli <[email protected]>
Fix cursor display if suggested string begins with newline
---
capf-autosuggest.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index 086358a..b58dbf8 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -129,6 +129,8 @@ point forward."
(setq capf-autosuggest--region (cons beg end)
capf-autosuggest--str (copy-sequence str))
(move-overlay capf-autosuggest--overlay end end)
+ (when (eq ?\n (aref str 0))
+ (setq str (concat " " str)))
(add-text-properties 0 1 (list 'cursor (length str)) str)
(add-face-text-property 0 (length str) 'capf-autosuggest-face t
str)
(overlay-put capf-autosuggest--overlay 'after-string str)