diff src/testdir/test_visual.vim @ 26159:34606aec52b3 v8.2.3611

patch 8.2.3611: crash when using CTRL-W f without finding a file name Commit: https://github.com/vim/vim/commit/615ddd5342b50a6878a907062aa471740bd9a847 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 17 18:00:31 2021 +0000 patch 8.2.3611: crash when using CTRL-W f without finding a file name Problem: Crash when using CTRL-W f without finding a file name. Solution: Bail out when the file name length is zero.
author Bram Moolenaar <Bram@vim.org>
date Wed, 17 Nov 2021 19:15:03 +0100
parents 203b0f3a741a
children 8da90cdcec68
line wrap: on
line diff
--- a/src/testdir/test_visual.vim
+++ b/src/testdir/test_visual.vim
@@ -1265,6 +1265,14 @@ func Test_visual_block_with_virtualedit(
   call delete('XTest_block')
 endfunc
 
+func Test_visual_block_ctrl_w_f()
+  " Emtpy block selected in new buffer should not result in an error.
+  au! BufNew foo sil norm f
+  edit foo
+
+  au! BufNew
+endfunc
+
 func Test_visual_reselect_with_count()
   " this was causing an illegal memory access
   let lines =<< trim END