changeset 27211:61d6a31a5874 v8.2.4134

patch 8.2.4134: MS-Windows: test for import with absolute path fails Commit: https://github.com/vim/vim/commit/113b8dc111febf605cd1492788353be6c3931fce Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 18 13:43:58 2022 +0000 patch 8.2.4134: MS-Windows: test for import with absolute path fails Problem: MS-Windows: test for import with absolute path fails. Solution: Handle path starting with slash as an absolute path.
author Bram Moolenaar <Bram@vim.org>
date Tue, 18 Jan 2022 14:45:05 +0100
parents 307f23f40ccb
children ceba1e0d0210
files src/version.c src/vim9script.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4134,
+/**/
     4133,
 /**/
     4132,
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -468,7 +468,13 @@ handle_import(
 	    vim_free(from_name);
 	}
     }
-    else if (mch_isFullName(tv.vval.v_string))
+    else if (mch_isFullName(tv.vval.v_string)
+#ifdef BACKSLASH_IN_FILENAME
+	    // On MS-Windows omitting the drive is still handled like an
+	    // absolute path, not using 'runtimepath'.
+	    || *tv.vval.v_string == '/' || *tv.vval.v_string == '\\'
+#endif
+	    )
     {
 	// Absolute path: "/tmp/name.vim"
 	if (is_autoload)