diff src/testdir/test_normal.vim @ 10154:4647267906cc v7.4.2347

commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 8 23:35:30 2016 +0200 patch 7.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.
author Christian Brabandt <cb@256bit.org>
date Thu, 08 Sep 2016 23:45:06 +0200
parents de20f2434807
children 520e0e732b87
line wrap: on
line diff
--- 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