patch 9.1.0359: MS-Windows: relative import in a script sourced from a buffer doesn't work

Problem:  MS-Windows: Relative import in a script sourced from a buffer
          doesn't work (Ernie Rael)
Solution: Set a filename, so that we are not trying to use
          script-relative filename (Yegappan Lakshmanan)

When a script is sourced from a buffer, the file name is set to ":source
buffer=". In MS-Windows, the ":" is a path separator character (used
after a drive letter). This results in the code trying to use the ":"
prefix to import the script on MS-Windows. To fix this, when importing a
script from a script sourced from a buffer with nofile, don't use
a script relative path name.

fixes #14588
closes: #14603

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/scriptfile.c b/src/scriptfile.c
index cc76260..54af759 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -1430,8 +1430,13 @@
 	return NULL;
 
     // Use ":source buffer=<num>" as the script name
-    vim_snprintf((char *)IObuff, IOSIZE, ":source buffer=%d", curbuf->b_fnum);
-    fname = vim_strsave(IObuff);
+    if (curbuf->b_ffname != NULL)
+	fname = vim_strsave(curbuf->b_ffname);
+    else
+    {
+	vim_snprintf((char *)IObuff, IOSIZE, ":source buffer=%d", curbuf->b_fnum);
+	fname = vim_strsave(IObuff);
+    }
     if (fname == NULL)
 	return NULL;