]> granicus.if.org Git - vim/commitdiff
patch 8.1.0007: no test for "o" and "O" in Visual block mode v8.1.0007
authorBram Moolenaar <Bram@vim.org>
Sun, 20 May 2018 12:06:38 +0000 (14:06 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 20 May 2018 12:06:38 +0000 (14:06 +0200)
Problem:    No test for "o" and "O" in Visual block mode.
Solution:   Add a test. (Dominique Pelle, closes #2932)

src/testdir/test_visual.vim
src/version.c

index 3a7d273c4db2ffb7cebc84b669ee80e83dfe7b8c..5b181d30938dbe0f66a39bb42d35c3aacba45995 100644 (file)
@@ -155,6 +155,25 @@ func Test_blockwise_visual()
   enew!
 endfunc
 
+" Test swapping corners in blockwise visual mode with o and O
+func Test_blockwise_visual_o_O()
+  enew!
+
+  exe "norm! 10i.\<Esc>Y4P3lj\<C-V>4l2jr "
+  exe "norm! gvO\<Esc>ra"
+  exe "norm! gvO\<Esc>rb"
+  exe "norm! gvo\<C-c>rc"
+  exe "norm! gvO\<C-c>rd"
+
+  call assert_equal(['..........',
+        \            '...c   d..',
+        \            '...     ..',
+        \            '...a   b..',
+        \            '..........'], getline(1, '$'))
+
+  enew!
+endfun
+
 " Test Virtual replace mode.
 func Test_virtual_replace()
   if exists('&t_kD')
index 4093a8c00b5cffa46ea1cdb6013015e757987cbf..f18e711fba55a8ea49037341824a662149066da1 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    7,
 /**/
     6,
 /**/