summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-09-08 23:35:30 +0200
committerBram Moolenaar <Bram@vim.org>2016-09-08 23:35:30 +0200
commitc4a908e83690844b0d3a46124ba6af7d23485d69 (patch)
tree1a38f95d4fb857bd49b70a60e9de225c19b4574a /src/testdir
parentabd468ed0fbcba391e7833feeaa7de3ced841455 (diff)
downloadvim-git-c4a908e83690844b0d3a46124ba6af7d23485d69.tar.gz
patch 7.4.2347v7.4.2347
Problem: Crash when closing a buffer while Visual mode is active. (Dominique Pelle) Solution: Adjust the position before computing the number of lines. When closing the current buffer stop Visual mode.
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_normal.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index b894a633c..79af7b258 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -1998,3 +1998,17 @@ func! Test_normal46_ignore()
" clean up
bw!
endfu
+
+func! Test_normal47_visual_buf_wipe()
+ " This was causing a crash or ml_get error.
+ enew!
+ call setline(1,'xxx')
+ normal $
+ new
+ call setline(1, range(1,2))
+ 2
+ exe "norm \<C-V>$"
+ bw!
+ norm yp
+ set nomodified
+endfu