mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 01:09:56 +10:00
vim-patch:8.2.3219: :find searches non-existing directories
Problem: :find searches non-existing directories.
Solution: Check the path is not "..". Update help. (Christian Brabandt,
closes vim/vim#8612, closes vim/vim#8533)
7a4ca32175
Change STRNCAT to STRLCAT as clint doesn't like the former.
Include a typo fix from 2f0936cb9a (diff-7e9292cae1f2ba70dd5b17d2d162693a91044ada6ac99e9c3e8917f32878c097)
This commit is contained in:
@@ -226,4 +226,26 @@ func Test_find_cmd()
|
||||
call assert_fails('tabfind', 'E471:')
|
||||
endfunc
|
||||
|
||||
func Test_find_non_existing_path()
|
||||
new
|
||||
let save_path = &path
|
||||
let save_dir = getcwd()
|
||||
call mkdir('dir1/dir2', 'p')
|
||||
call writefile([], 'dir1/file.txt')
|
||||
call writefile([], 'dir1/dir2/base.txt')
|
||||
call chdir('dir1/dir2')
|
||||
e base.txt
|
||||
set path=../include
|
||||
|
||||
call assert_fails(':find file.txt', 'E345:')
|
||||
|
||||
call chdir(save_dir)
|
||||
bw!
|
||||
call delete('dir1/dir2/base.txt', 'rf')
|
||||
call delete('dir1/dir2', 'rf')
|
||||
call delete('dir1/file.txt', 'rf')
|
||||
call delete('dir1', 'rf')
|
||||
let &path = save_path
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user