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

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

[elpa] externals/capf-autosuggest 9fb8c7e 10/63: Fix cursor display if s


From: ELPA Syncer
Subject: [elpa] externals/capf-autosuggest 9fb8c7e 10/63: Fix cursor display if suggested string begins with newline
Date: Wed, 27 Oct 2021 14:57:54 -0400 (EDT)

branch: externals/capf-autosuggest
commit 9fb8c7e7a5e56fa9604819568e6f8e6b1dd1a443
Author: jakanakaevangeli <jakanakaevangeli@chiru.no>
Commit: jakanakaevangeli <jakanakaevangeli@chiru.no>

    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)



reply via email to

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