vim-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.
615ddd5342
This commit is contained in:
zeertzjq
2022-01-18 10:05:31 +08:00
parent 0a65d821fc
commit ec39e1e421
4 changed files with 23 additions and 2 deletions

View File

@@ -1123,6 +1123,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