mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
fix(runtime): respect 'fileignorecase' when sourcing (#24344)
This commit is contained in:
@@ -275,7 +275,7 @@ static bool source_callback_vim_lua(int num_fnames, char **fnames, bool all, voi
|
||||
bool did_one = false;
|
||||
|
||||
for (int i = 0; i < num_fnames; i++) {
|
||||
if (str_ends_with(fnames[i], ".vim")) {
|
||||
if (path_with_extension(fnames[i], "vim")) {
|
||||
(void)do_source(fnames[i], false, DOSO_NONE, cookie);
|
||||
did_one = true;
|
||||
if (!all) {
|
||||
@@ -285,7 +285,7 @@ static bool source_callback_vim_lua(int num_fnames, char **fnames, bool all, voi
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_fnames; i++) {
|
||||
if (str_ends_with(fnames[i], ".lua")) {
|
||||
if (path_with_extension(fnames[i], "lua")) {
|
||||
(void)do_source(fnames[i], false, DOSO_NONE, cookie);
|
||||
did_one = true;
|
||||
if (!all) {
|
||||
@@ -308,7 +308,8 @@ static bool source_callback(int num_fnames, char **fnames, bool all, void *cooki
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_fnames; i++) {
|
||||
if (!str_ends_with(fnames[i], ".vim") && !str_ends_with(fnames[i], ".lua")) {
|
||||
if (!path_with_extension(fnames[i], "vim")
|
||||
&& !path_with_extension(fnames[i], "lua")) {
|
||||
(void)do_source(fnames[i], false, DOSO_NONE, cookie);
|
||||
did_one = true;
|
||||
if (!all) {
|
||||
|
Reference in New Issue
Block a user