summaryrefslogtreecommitdiff
path: root/src/gui_w48.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui_w48.c')
-rw-r--r--src/gui_w48.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui_w48.c b/src/gui_w48.c
index 7b8d8de30..eeaf651c7 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -3277,6 +3277,7 @@ _OnScroll(
return 0;
}
+
/*
* Get command line arguments.
* Use "prog" as the name of the program and "cmdline" as the arguments.
@@ -3299,6 +3300,14 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
char **argv = NULL;
int round;
+#ifdef FEAT_MBYTE
+ /* Try using the Unicode version first, it takes care of conversion when
+ * 'encoding' is changed. */
+ argc = get_cmd_argsW(&argv);
+ if (argc != 0)
+ goto done;
+#endif
+
/* Handle the program name. Remove the ".exe" extension, and find the 1st
* non-space. */
p = strrchr(prog, '.');
@@ -3405,8 +3414,9 @@ get_cmd_args(char *prog, char *cmdline, char ***argvp, char **tofree)
}
}
- argv[argc] = NULL; /* NULL-terminated list */
+done:
+ argv[argc] = NULL; /* NULL-terminated list */
*argvp = argv;
return argc;
}