diff src/testdir/test_visual.vim @ 25070:f397a21b3e4c v8.2.3072

patch 8.2.3072: "zy" does not work well when "virtualedit' is "block" Commit: https://github.com/vim/vim/commit/7d7bcc6ba01454c1cbb1dcbf5f11c3a4051535d6 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 28 21:54:27 2021 +0200 patch 8.2.3072: "zy" does not work well when "virtualedit' is "block" Problem: The "zy" command does not work well when 'virtualedit' is set to "block". (Johann H?chtl) Solution: Make endspaces zero. (Christian Brabandt, closes #8468, closes #8448)
author Bram Moolenaar <Bram@vim.org>
date Mon, 28 Jun 2021 22:00:05 +0200
parents f1121eb17e14
children bd46322bea66
line wrap: on
line diff
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -1,6 +1,7 @@
 " Tests for various Visual modes.
 
 source shared.vim
+source check.vim
 
 func Test_block_shift_multibyte()
   " Uses double-wide character.
@@ -1225,5 +1226,24 @@ func Test_visual_put_in_block_using_zy_a
   bwipe!
 endfunc
 
+func Test_visual_put_blockedit_zy_and_zp()
+  new
+
+  call setline(1, ['aa', 'bbbbb', 'ccc', '', 'XX', 'GGHHJ', 'RTZU'])
+  exe "normal! gg0\<c-v>2j$zy"
+  norm! 5gg0zP
+  call assert_equal(['aa', 'bbbbb', 'ccc', '', 'aaXX', 'bbbbbGGHHJ', 'cccRTZU'], getline(1, 7))
+  "
+  " now with blockmode editing
+  sil %d
+  :set ve=block
+  call setline(1, ['aa', 'bbbbb', 'ccc', '', 'XX', 'GGHHJ', 'RTZU'])
+  exe "normal! gg0\<c-v>2j$zy"
+  norm! 5gg0zP
+  call assert_equal(['aa', 'bbbbb', 'ccc', '', 'aaXX', 'bbbbbGGHHJ', 'cccRTZU'], getline(1, 7))
+  set ve&vim
+  bw!
+endfunc
+
 
 " vim: shiftwidth=2 sts=2 expandtab