File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2356,6 +2356,11 @@ leave the cursor just after the new text."
2356
2356
(setq beg evil-visual-beginning
2357
2357
end evil-visual-end
2358
2358
type (evil-visual-type))
2359
+ ; ; When pasting charwise text into linewise selection, keep trailing NL
2360
+ (when (and text end
2361
+ (eq 'line type)
2362
+ (not (eq ?\n (aref text (1- (length text))))))
2363
+ (cl-decf end))
2359
2364
(evil-visual-rotate 'upper-left )
2360
2365
(evil-delete beg end type (unless evil-kill-on-visual-paste ?_ ))
2361
2366
(when (and (eq yank-handler #'evil-yank-line-handler )
Original file line number Diff line number Diff line change @@ -3081,7 +3081,7 @@ word3[]"))
3081
3081
(" yiwyywyiw^j" )
3082
3082
" word1a word1b word1c\n [w]ord2a word2b\n word3a word3b word3c word3d\n "
3083
3083
(" Vp" )
3084
- "word1a word1b word1c\nword1[b]word3a word3b word3c word3d\n"))
3084
+ " word1a word1b word1c\n word1[b]\n word3a word3b word3c word3d\n " ))
3085
3085
(ert-info (" Visual-line paste, char paste, line pop" )
3086
3086
(evil-test-buffer
3087
3087
" [w]ord1a word1b word1c\n word2a word2b\n word3a word3b word3c word3d\n "
@@ -3095,7 +3095,7 @@ word3[]"))
3095
3095
(" yiwyywyiw^j" )
3096
3096
" word1a word1b word1c\n [w]ord2a word2b\n word3a word3b word3c word3d\n "
3097
3097
(" Vp\C -p\C -p" )
3098
- "word1a word1b word1c\nword1[a]word3a word3b word3c word3d\n")))
3098
+ " word1a word1b word1c\n word1[a]\n word3a word3b word3c word3d\n " )))
3099
3099
3100
3100
(ert-deftest evil-test-register ()
3101
3101
" Test yanking and pasting to and from register."
You can’t perform that action at this time.
0 commit comments