aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_gf.vim
diff options
context:
space:
mode:
authorjdrouhard <john@drouhard.dev>2022-08-01 16:39:23 -0500
committerGitHub <noreply@github.com>2022-08-02 05:39:23 +0800
commitd4b9f8186d4a73a661a407efb63fe8abca2c4e88 (patch)
tree860623d28c8c877eee3e32f92b229202efb4aa8c /src/nvim/testdir/test_gf.vim
parente99de3f12f00662e8131fed9912792f6d43c4975 (diff)
downloadrneovim-d4b9f8186d4a73a661a407efb63fe8abca2c4e88.tar.gz
rneovim-d4b9f8186d4a73a661a407efb63fe8abca2c4e88.tar.bz2
rneovim-d4b9f8186d4a73a661a407efb63fe8abca2c4e88.zip
vim-patch:9.0.0126 (#19612)
vim-patch:9.0.0126: expanding file names fails in dir with more than 255 entries Problem: Expanding file names fails in directory with more than 255 entries. Solution: Use an int instead of char_u to count. (John Drouhard, closes vim/vim#10818) https://github.com/vim/vim/commit/95fca12b0e8a351ce4416417323db24c63eb940a
Diffstat (limited to 'src/nvim/testdir/test_gf.vim')
-rw-r--r--src/nvim/testdir/test_gf.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_gf.vim b/src/nvim/testdir/test_gf.vim
index 1569177d66..c48e56976e 100644
--- a/src/nvim/testdir/test_gf.vim
+++ b/src/nvim/testdir/test_gf.vim
@@ -194,4 +194,27 @@ func Test_gf_includeexpr()
delfunc IncFunc
endfunc
+" Check that expanding directories can handle more than 255 entries.
+func Test_gf_subdirs_wildcard()
+ let cwd = getcwd()
+ let dir = 'Xtestgf_dir'
+ call mkdir(dir)
+ call chdir(dir)
+ for i in range(300)
+ call mkdir(i)
+ call writefile([], i .. '/' .. i, 'S')
+ endfor
+ set path=./**
+
+ new | only
+ call setline(1, '99')
+ w! Xtest1
+ normal gf
+ call assert_equal('99', fnamemodify(bufname(''), ":t"))
+
+ call chdir(cwd)
+ call delete(dir, 'rf')
+ set path&
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab