From: Bram Moolenaar Date: Sun, 16 Jan 2022 11:12:12 +0000 (+0000) Subject: patch 8.2.4104: Vim9: lower casing the autoload prefix causes problems X-Git-Tag: v8.2.4104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfac409d0b24d212a6d846edb651c49dac03745f;p=thirdparty%2Fvim.git patch 8.2.4104: Vim9: lower casing the autoload prefix causes problems Problem: Vim9: lower casing the autoload prefix causes problems. Solution: Always store the prefix with case preserved. --- diff --git a/src/scriptfile.c b/src/scriptfile.c index 0d39f38fb1..350813934a 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -2156,11 +2156,7 @@ get_autoload_prefix(scriptitem_T *si) if (p == NULL) return NULL; -#ifdef CASE_INSENSITIVE_FILENAME - prefix = strlow_save(p); -#else prefix = vim_strsave(p); -#endif if (prefix == NULL) return NULL; diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim index 79e572896b..6c6911a1e4 100644 --- a/src/testdir/test_vim9_import.vim +++ b/src/testdir/test_vim9_import.vim @@ -1485,6 +1485,15 @@ def Test_vim9_autoload_case_sensitive() END CheckScriptSuccess(lines) + if !has('fname_case') + lines =<< trim END + vim9script + import autoload 'CaseSensitive.vim' + import autoload 'casesensitive.vim' + END + CheckScriptFailure(lines, 'E1262:') + endif + delete('Xdir', 'rf') &rtp = save_rtp enddef diff --git a/src/version.c b/src/version.c index d0d9b623bb..52b75a67d8 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4104, /**/ 4103, /**/