[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 47731a3 2/4: Fix the pseudo-popup's overlay int
From: |
ELPA Syncer |
Subject: |
[elpa] externals/company 47731a3 2/4: Fix the pseudo-popup's overlay interaction with visual-line-mode |
Date: |
Fri, 12 Nov 2021 18:57:12 -0500 (EST) |
branch: externals/company
commit 47731a3832f640ee199b4c3913105e26bbb0bed6
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Fix the pseudo-popup's overlay interaction with visual-line-mode
When it ends up beginning not after a newline.
Fixes #1257.
---
NEWS.md | 2 ++
company.el | 3 +++
2 files changed, 5 insertions(+)
diff --git a/NEWS.md b/NEWS.md
index 114b117..4e71b65 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
## Next
+* Better compatibility with `visyal-line-mdoe`
+ ([#1257](https://github.com/company-mode/company-mode/issues/1257)).
* Better compatibility with `org-indent-mode`
([#1252](https://github.com/company-mode/company-mode/issues/1252)).
* New backend command, `deprecated`. It returns whether the completion item is
diff --git a/company.el b/company.el
index b4b5f32..a799b51 100644
--- a/company.el
+++ b/company.el
@@ -3506,6 +3506,9 @@ Returns a negative number if the tooltip should be
displayed above point."
;; Beat outline's folding overlays.
;; And Flymake (53). And Flycheck (110).
(overlay-put ov 'priority 111)
+ ;; visual-line-mode
+ (when (memq (char-before (overlay-start ov)) '(?\s ?\t))
+ (setq disp (concat "\n" disp)))
;; No (extra) prefix for the first line.
(overlay-put ov 'line-prefix "")
(overlay-put ov 'before-string disp)