]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4104: Vim9: lower casing the autoload prefix causes problems v8.2.4104
authorBram Moolenaar <Bram@vim.org>
Sun, 16 Jan 2022 11:12:12 +0000 (11:12 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 16 Jan 2022 11:12:12 +0000 (11:12 +0000)
Problem:    Vim9: lower casing the autoload prefix causes problems.
Solution:   Always store the prefix with case preserved.

src/scriptfile.c
src/testdir/test_vim9_import.vim
src/version.c

index 0d39f38fb1fdca0b5b1b4fe66c924b8faca64b44..350813934a9608621a0d9a83350640b8e063de52 100644 (file)
@@ -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;
 
index 79e572896b296a9f209bc62c48e47f19e2fc7b40..6c6911a1e4fa41f49516c3cd3db3c0869de36a9f 100644 (file)
@@ -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
index d0d9b623bb30c0c3476e8817eddfa548190ab9a1..52b75a67d8d26c82b3e67cedd5ee183c699f478c 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4104,
 /**/
     4103,
 /**/