mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
81525dc5c3
commit
bdfa1479d2
@ -1370,6 +1370,11 @@ find_file_in_path_option (
|
|||||||
char_u *buf = NULL;
|
char_u *buf = NULL;
|
||||||
int rel_to_curdir;
|
int rel_to_curdir;
|
||||||
|
|
||||||
|
if (rel_fname != NULL && path_with_url((const char *)rel_fname)) {
|
||||||
|
// Do not attempt to search "relative" to a URL. #6009
|
||||||
|
rel_fname = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (first == TRUE) {
|
if (first == TRUE) {
|
||||||
/* copy file name into NameBuff, expanding environment variables */
|
/* copy file name into NameBuff, expanding environment variables */
|
||||||
save_char = ptr[len];
|
save_char = ptr[len];
|
||||||
|
@ -112,4 +112,40 @@ describe(':terminal (with fake shell)', function()
|
|||||||
eq(2, eval("1+1")) -- Still alive?
|
eq(2, eval("1+1")) -- Still alive?
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('works with findfile()', function()
|
||||||
|
execute('terminal')
|
||||||
|
eq('term://', string.match(eval('bufname("%")'), "^term://"))
|
||||||
|
eq('scripts/shadacat.py', eval('findfile("scripts/shadacat.py", ".")'))
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('works with :find', function()
|
||||||
|
terminal_with_fake_shell()
|
||||||
|
wait()
|
||||||
|
screen:expect([[
|
||||||
|
ready $ |
|
||||||
|
[Process exited 0] |
|
||||||
|
|
|
||||||
|
-- TERMINAL -- |
|
||||||
|
]])
|
||||||
|
eq('term://', string.match(eval('bufname("%")'), "^term://"))
|
||||||
|
helpers.feed([[<C-\><C-N>]])
|
||||||
|
execute([[find */shadacat.py]])
|
||||||
|
eq('scripts/shadacat.py', eval('bufname("%")'))
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('works with gf', function()
|
||||||
|
terminal_with_fake_shell([[echo "scripts/shadacat.py"]])
|
||||||
|
wait()
|
||||||
|
screen:expect([[
|
||||||
|
ready $ echo "scripts/shadacat.py" |
|
||||||
|
|
|
||||||
|
[Process exited 0] |
|
||||||
|
-- TERMINAL -- |
|
||||||
|
]])
|
||||||
|
helpers.feed([[<C-\><C-N>]])
|
||||||
|
eq('term://', string.match(eval('bufname("%")'), "^term://"))
|
||||||
|
helpers.feed([[ggf"lgf]])
|
||||||
|
eq('scripts/shadacat.py', eval('bufname("%")'))
|
||||||
|
end)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user