diff options
| author | Axel Forsman <axel@axelf.se> | 2023-01-03 11:53:38 +0100 |
|---|---|---|
| committer | Tom Dalziel <tom_dl@hotmail.com> | 2023-08-20 23:46:23 +0100 |
| commit | 433c28cb104dae506205485b87c2c13d2458f495 (patch) | |
| tree | 3e1212618902835b873d0751734cc57578f40230 /evil-common.el | |
| parent | 7fb60f6126bf1e82a7e63a23a67b4b0afc6cec96 (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.el | 18 |
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 |
