[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 83c4852b1c 2/3: Add a hack for the log-edit buf
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/company 83c4852b1c 2/3: Add a hack for the log-edit buffer (to skip over the separator) |
|
Date: |
Fri, 17 Nov 2023 18:57:33 -0500 (EST) |
branch: externals/company
commit 83c4852b1c44698b3841ac394174c2e12fe84415
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
Add a hack for the log-edit buffer (to skip over the separator)
---
company.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/company.el b/company.el
index 907d616626..7420540074 100644
--- a/company.el
+++ b/company.el
@@ -3820,8 +3820,15 @@ Returns a negative number if the tooltip should be
displayed above point."
(let (nl beg end ov args)
(save-excursion
- (setq nl (< (move-to-window-line row) row)
- beg (point)
+ (setq nl (< (move-to-window-line row) row))
+ ;; HACK: Very specific to the log-edit buffer. Could alternatively
+ ;; look up the `display-line-numbers-disable' property, but with
+ ;; larger consequences.
+ (when (and (not nl) (> height 0))
+ (while (eq (get-char-property (point) 'face)
+ 'log-edit-headers-separator)
+ (vertical-motion 1)))
+ (setq beg (point)
end (save-excursion
(vertical-motion (abs height))
(point))