aboutsummaryrefslogtreecommitdiff
path: root/evil-states.el
diff options
context:
space:
mode:
authorAxel Forsman <axelsfor@gmail.com>2023-05-29 23:41:06 +0200
committerGitHub <noreply@github.com>2023-05-29 23:41:06 +0200
commit2a80de388f05af10edd24aecd0de2f514f75d1ff (patch)
tree69b746c2b5105600c9e9d7ca774a472e147f204d /evil-states.el
parentb7bc385a0b41c87133e8e7f3beaca2a97b74b17c (diff)
Fix pasting in visual block mode (#1786)
Co-authored-by: Tom Dalziel <tom_dl@hotmail.com>
Diffstat (limited to 'evil-states.el')
-rw-r--r--evil-states.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/evil-states.el b/evil-states.el
index 73d51ca..abade4c 100644
--- a/evil-states.el
+++ b/evil-states.el
@@ -759,10 +759,9 @@ the direction of the last selection."
(defun evil-visual-type (&optional selection)
"Return the type of the Visual selection.
If SELECTION is specified, return the type of that instead."
- (if (and (null selection) (evil-visual-state-p))
- (or evil-this-type (evil-visual-type evil-visual-selection))
- (setq selection (or selection evil-visual-selection))
- (symbol-value (cdr-safe (assq selection evil-visual-alist)))))
+ (or (and (null selection) (evil-visual-state-p) evil-this-type)
+ (symbol-value (cdr (assq (or selection evil-visual-selection)
+ evil-visual-alist)))))
(defun evil-visual-goto-end ()
"Go to the last line of the Visual selection.