aboutsummaryrefslogtreecommitdiff
path: root/evil-common.el
diff options
context:
space:
mode:
authorAxel Forsman <axel@axelf.se>2023-01-03 11:53:38 +0100
committerAxel Forsman <axelsfor@gmail.com>2023-08-09 11:23:05 +0200
commit26db9441a13ebedb2481d7ada4c3b5e60ec22795 (patch)
treed533563038cf9896e57d84d68e137654f4cbf6b7 /evil-common.el
parent6e30037fdc6a275d78d6b82d89bd8e47bcf4d4e3 (diff)
Stop the '</'> and '[/'] marks from intertwining
The function evil-visual-paste would assign to evil-visual-point/-mark the same markers used by the '[ and '] marks. Therefore, after a single visual paste Normal mode "gv" would act funkily in that buffer ever after. To reproduce: * Enter a new buffer with the contents: x y * With the cursor on "x", type "ylvpjxgv". The expectation is that "x" should be re-selected. Instead the empty lower line is selected due to it being the previously changed text. This commit fixes this, and also removes unused definitions related to evil-visual-previous-point/-mark.
Diffstat (limited to 'evil-common.el')
-rw-r--r--evil-common.el18
1 files changed, 0 insertions, 18 deletions
diff --git a/evil-common.el b/evil-common.el
index ffe5eb7..59938eb 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -2160,21 +2160,6 @@ The earlier settings of Transient Mark mode are stored in
(funcall var (if val 1 -1))
(setq var val))))))
-(defun evil-save-mark ()
- "Save the current mark, including whether it is transient.
-See also `evil-restore-mark'."
- (unless evil-visual-previous-mark
- (setq evil-visual-previous-mark (mark t))
- (evil-save-transient-mark-mode)))
-
-(defun evil-restore-mark ()
- "Restore the mark, including whether it was transient.
-See also `evil-save-mark'."
- (when evil-visual-previous-mark
- (evil-restore-transient-mark-mode)
- (evil-move-mark evil-visual-previous-mark)
- (setq evil-visual-previous-mark nil)))
-
;; In theory, an active region implies Transient Mark mode, and
;; disabling Transient Mark mode implies deactivating the region.
;; In practice, Emacs never clears `mark-active' except in Transient
@@ -2534,9 +2519,6 @@ is negative this is a more recent kill."
(unless evil-last-paste
(user-error "Previous paste command used a register"))
(evil-undo-pop)
- (when (eq last-command 'evil-visual-paste)
- (evil-swap evil-visual-previous-mark evil-visual-mark)
- (evil-swap evil-visual-previous-point evil-visual-point))
(goto-char (nth 2 evil-last-paste))
(setq this-command (nth 0 evil-last-paste))
;; use temporary kill-ring, so the paste cannot modify it