[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-goggles 0070c9d844: Use non-interactive evil-get-mark
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-goggles 0070c9d844: Use non-interactive evil-get-marker in paste advice |
Date: |
Fri, 30 Jun 2023 04:00:57 -0400 (EDT) |
branch: elpa/evil-goggles
commit 0070c9d8447e1696f8713d0c13ff64ef0979d580
Author: Evgeni Kolev <evgenysw@gmail.com>
Commit: GitHub <noreply@github.com>
Use non-interactive evil-get-marker in paste advice
The non-interactive function evil-get-marker is used instead of the
interactive evil-goto-mark. This avoids unwanted sides effects due to user
advices of the interactive function.
Fix #34
---
evil-goggles.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/evil-goggles.el b/evil-goggles.el
index bb515db66c..0afb23ad69 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -542,8 +542,8 @@ REGISTER and YANK-HANDLER are the argumenets to the
original functions."
;; paste called via evil-paste-pop/evil-paste-pop-next (via
`C-n', `C-p')
(memq real-this-command '(evil-paste-pop evil-paste-pop-next)))
(evil-normal-state-p))
- (let* ((beg (save-excursion (evil-goto-mark ?\[) (if (eolp) (1+ (point))
(point))))
- (end (save-excursion (evil-goto-mark ?\]) (if (eolp) (1+ (point))
(point))))
+ (let* ((beg (save-excursion (goto-char (evil-get-marker ?\[)) (if (eolp)
(1+ (point)) (point))))
+ (end (save-excursion (goto-char (evil-get-marker ?\])) (if (eolp)
(1+ (point)) (point))))
(is-vertical-block-pasted (evil-goggles--paste-vert-block-p
register yank-handler)))
(if is-vertical-block-pasted
;; XXX the async hint can't show vertical block hints - use a
blocking hint if a vert block is pasted
@@ -551,7 +551,6 @@ REGISTER and YANK-HANDLER are the argumenets to the
original functions."
(evil-goggles--show-blocking-hint beg (1+ end)
is-vertical-block-pasted)
(evil-goggles--show-async-hint beg end)))))
-
(defun evil-goggles--paste-vert-block-p (register yank-handler)
"Return t if the paste is a vertical block.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/evil-goggles 0070c9d844: Use non-interactive evil-get-marker in paste advice,
ELPA Syncer <=