mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.4.432
Problem: When the startup code expands command line arguments, setting 'encoding' will not properly convert the arguments. Solution: Call get_cmd_argsW() early in main(). (Yasuhiro Matsumoto)
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -178,6 +178,14 @@ main
|
||||
*/
|
||||
mch_early_init();
|
||||
|
||||
#if defined(WIN32) && defined(FEAT_MBYTE)
|
||||
/*
|
||||
* MingW expands command line arguments, which confuses our code to
|
||||
* convert when 'encoding' changes. Get the unexpanded arguments.
|
||||
*/
|
||||
argc = get_cmd_argsW(&argv);
|
||||
#endif
|
||||
|
||||
/* Many variables are in "params" so that we can pass them to invoked
|
||||
* functions without a lot of arguments. "argc" and "argv" are also
|
||||
* copied, so that they can be changed. */
|
||||
@@ -1496,6 +1504,9 @@ getout(exitval)
|
||||
if (garbage_collect_at_exit)
|
||||
garbage_collect();
|
||||
#endif
|
||||
#if defined(WIN32) && defined(FEAT_MBYTE)
|
||||
free_cmd_argsW();
|
||||
#endif
|
||||
|
||||
mch_exit(exitval);
|
||||
}
|
||||
|
Reference in New Issue
Block a user