summaryrefslogtreecommitdiff
path: root/src/testdir/test_visual.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-20 14:06:38 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-20 14:06:38 +0200
commit2e94976abd1cd6b94db38d4f2a1cfd71808b8100 (patch)
tree51b9f6b5df27ba01f310f59fdac9516244efb12e /src/testdir/test_visual.vim
parenta772baf85afac44bb8eb20ff808637ee6eedec54 (diff)
downloadvim-git-2e94976abd1cd6b94db38d4f2a1cfd71808b8100.tar.gz
patch 8.1.0007: no test for "o" and "O" in Visual block modev8.1.0007
Problem: No test for "o" and "O" in Visual block mode. Solution: Add a test. (Dominique Pelle, closes #2932)
Diffstat (limited to 'src/testdir/test_visual.vim')
-rw-r--r--src/testdir/test_visual.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim
index 3a7d273c4..5b181d309 100644
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -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')