diff src/testdir/test_ex_mode.vim @ 28477:0ae0946ebf9b v8.2.4763

patch 8.2.4763: using invalid pointer with "V:" in Ex mode Commit: https://github.com/vim/vim/commit/f50808ed135ab973296bca515ae4029b321afe47 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 16 18:52:17 2022 +0100 patch 8.2.4763: using invalid pointer with "V:" in Ex mode Problem: Using invalid pointer with "V:" in Ex mode. Solution: Correctly handle the command being changed to "+".
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Apr 2022 20:00:03 +0200
parents 81d391f7c189
children 8e87a5d2284c
line wrap: on
line diff
--- a/src/testdir/test_ex_mode.vim
+++ b/src/testdir/test_ex_mode.vim
@@ -250,5 +250,18 @@ func Test_ex_mode_large_indent()
   bwipe!
 endfunc
 
+" This was accessing illegal memory when using "+" for eap->cmd.
+func Test_empty_command_visual_mode()
+  let lines =<< trim END
+      r<sfile>
+      0norm0V:
+      :qall!
+  END
+  call writefile(lines, 'Xexmodescript')
+  call assert_equal(1, RunVim([], [], '-u NONE -e -s -S Xexmodescript'))
+
+  call delete('Xexmodescript')
+endfunc
+
 
 " vim: shiftwidth=2 sts=2 expandtab