[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/svg-tag-mode 02d60e0a86 55/63: Fixed cursor selection.
From: |
ELPA Syncer |
Subject: |
[elpa] externals/svg-tag-mode 02d60e0a86 55/63: Fixed cursor selection. |
Date: |
Mon, 27 Dec 2021 15:58:01 -0500 (EST) |
branch: externals/svg-tag-mode
commit 02d60e0a86f16c4ff3ce114aae2a205a022880ec
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Fixed cursor selection.
---
svg-tag-mode.el | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index 2cedd1ae97..b329ec6729 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -187,17 +187,21 @@ allows to create dynamic tags."
(defun svg-tag--cursor-function (win position direction)
"This function hides the tag when cursor is over it. This
allows to edit the tag."
- (let* ((extents (cond ((and (eq direction 'left) (< (point) position))
- `(,position . ,(next-property-change position)))
- ((and (eq direction 'left) (> (point) position))
- `(,(previous-property-change position) . ,(point)))
- ((and (eq direction 'entered) (> (point) position))
- `(,(point) . ,(next-property-change (point))))
- ((and (eq direction 'entered) (< (point) position))
- `(,(previous-property-change (point)) . ,position)))))
+ (let ((beg (if (eq direction 'entered)
+ (previous-property-change (+ (point) 1))
+ (previous-property-change (+ position 1))))
+ (end (if (eq direction 'entered)
+ (next-property-change (point))
+ (next-property-change position))))
(if (eq direction 'left)
- (font-lock-flush (car extents) (cdr extents))
- (font-lock-unfontify-region (car extents) (cdr extents)))))
+ (font-lock-flush beg end )
+ (font-lock-unfontify-region beg end))
+
+ ;; (if (eq direction 'entered)
+ ;; (message (concat "TAG: "
+ ;; (substring-no-properties
+ ;; (buffer-substring beg end )))))
+ ))
(defun svg-tag--build-keywords (item)
- [elpa] externals/svg-tag-mode 9ddf0e4f13 38/63: Rename screenshot, (continued)
- [elpa] externals/svg-tag-mode 9ddf0e4f13 38/63: Rename screenshot, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode b865793671 53/63: Updated copyright notices., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 95b5404997 35/63: Merge pull request #13 from tarsiiformes/cleanup, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 861c68af89 40/63: Updated example 1 to new tags format., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode ee16277655 42/63: Added examples from documentation, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 8533c6c174 50/63: Added progress bar example., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode d9a803a92e 49/63: Added date without time format example., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 3e49ddcee2 57/63: Cancel tag editing in read-only or view mode., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 7266de9f9c 61/63: Simplified advice on org fontify blocks., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 1d0d91bb00 46/63: Fixed layout, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 02d60e0a86 55/63: Fixed cursor selection.,
ELPA Syncer <=
- [elpa] externals/svg-tag-mode b5a00a5746 56/63: Bumped version number and fixed some documentation., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 85aed73bc6 58/63: Added custom option to let user decide on action at point., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode e2481ae15a 63/63: Modified example to highlight real org tags., ELPA Syncer, 2021/12/27