From 615ddd5342b50a6878a907062aa471740bd9a847 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 17 Nov 2021 18:00:31 +0000 Subject: 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. --- src/testdir/test_visual.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/testdir/test_visual.vim') diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index 20eb4b43e8..0c89dbb010 100644 --- 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 -- cgit v1.2.3