diff options
| author | Tom Dalziel <tom_dl@hotmail.com> | 2022-04-18 00:45:49 +0100 |
|---|---|---|
| committer | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2022-04-18 12:24:56 +0200 |
| commit | 214fd3bcd75bf5923654146e992bfe3576c7d3ee (patch) | |
| tree | 200a15aef5f9ad75bbb63d18e61235ab70a3c869 | |
| parent | a00e16899cc7a0446a4ef4f5e4a658ae42248b2e (diff) | |
Blockwise visual paste handles linewise text
| -rw-r--r-- | evil-commands.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/evil-commands.el b/evil-commands.el index 80a89d7..60285a6 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -2247,7 +2247,7 @@ The return value is the yanked text." (setq paste-eob t)) (evil-delete beg end (evil-visual-type) (unless evil-kill-on-visual-paste ?_)) (when (and (eq yank-handler #'evil-yank-line-handler) - (not (eq (evil-visual-type) 'line)) + (not (memq (evil-visual-type) '(line block))) (not (= evil-visual-end (point-max)))) (insert "\n")) (evil-normal-state) @@ -2258,6 +2258,8 @@ The return value is the yanked text." (lambda (&rest _) text))) (cond ((eq 'block (evil-visual-type)) + (when (eq yank-handler #'evil-yank-line-handler) + (setq text (concat "\n" text))) (evil-apply-on-block #'evil-insert-for-yank-at-col beg end t text)) (paste-eob (evil-paste-after count register)) (t (evil-paste-before count register))))) |
