[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beacon bde7818 6/6: Merge pull request #63 from yangshe
From: |
Stefan Monnier |
Subject: |
[elpa] externals/beacon bde7818 6/6: Merge pull request #63 from yangsheng6810/master |
Date: |
Wed, 17 Mar 2021 18:39:45 -0400 (EDT) |
branch: externals/beacon
commit bde78180c678b233c94321394f46a81dc6dce1da
Merge: 07a2e95 6eed864
Author: Artur Malabarba <Malabarba@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #63 from yangsheng6810/master
Fix beacon at end of a long line
---
beacon.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/beacon.el b/beacon.el
index c48d1df..0fbb00f 100644
--- a/beacon.el
+++ b/beacon.el
@@ -232,13 +232,20 @@ If COLORS is nil, OVERLAY is deleted!"
"")
'cursor 1000))))
+(defun beacon--visual-current-column ()
+ "Get the visual column we are at, takes long lines and visual line mode into
account."
+ (save-excursion
+ (let ((current (point)))
+ (beginning-of-visual-line)
+ (- current (point)))))
+
(defun beacon--after-string-overlay (colors)
"Put an overlay at point with an after-string property.
The property's value is a string of spaces with background
COLORS applied to each one."
;; The after-string must not be longer than the remaining columns
;; from point to right window-end else it will be wrapped around.
- (let ((colors (seq-take colors (- (window-width) (current-column) 1))))
+ (let ((colors (seq-take colors (- (window-width)
(beacon--visual-current-column) 1))))
(beacon--ov-put-after-string (beacon--make-overlay 0) colors)))
(defun beacon--ov-at-point ()
- [elpa] externals/beacon updated (729338b -> bde7818), Stefan Monnier, 2021/03/17
- [elpa] externals/beacon 088c574 1/6: Be more careful about ignoring temp buffers, Stefan Monnier, 2021/03/17
- [elpa] externals/beacon fc63ae6 2/6: Don't mess with match data in change hooks - Fix #60, Stefan Monnier, 2021/03/17
- [elpa] externals/beacon 6eed864 5/6: Fix beacon at end of a long line, Stefan Monnier, 2021/03/17
- [elpa] externals/beacon 8dfe644 3/6: Only vanish beacon if the buffer is visible - #60 again, Stefan Monnier, 2021/03/17
- [elpa] externals/beacon 07a2e95 4/6: Be more careful about always canceling the timer, Stefan Monnier, 2021/03/17
- [elpa] externals/beacon bde7818 6/6: Merge pull request #63 from yangsheng6810/master,
Stefan Monnier <=