|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.432
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.432
|
|
|
3ef2ca |
Problem: When the startup code expands command line arguments, setting
|
|
|
3ef2ca |
'encoding' will not properly convert the arguments.
|
|
|
3ef2ca |
Solution: Call get_cmd_argsW() early in main(). (Yasuhiro Matsumoto)
|
|
|
3ef2ca |
Files: src/os_win32.c, src/main.c, src/os_mswin.c
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.431/src/os_win32.c 2014-08-29 17:45:28.066467800 +0200
|
|
|
3ef2ca |
--- src/os_win32.c 2014-09-09 12:14:15.768500395 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 6461,6466 ****
|
|
|
3ef2ca |
--- 6461,6467 ----
|
|
|
3ef2ca |
int argc = 0;
|
|
|
3ef2ca |
int i;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
+ free_cmd_argsW();
|
|
|
3ef2ca |
ArglistW = CommandLineToArgvW(GetCommandLineW(), &nArgsW);
|
|
|
3ef2ca |
if (ArglistW != NULL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 6493,6499 ****
|
|
|
3ef2ca |
--- 6494,6504 ----
|
|
|
3ef2ca |
global_argc = argc;
|
|
|
3ef2ca |
global_argv = argv;
|
|
|
3ef2ca |
if (argc > 0)
|
|
|
3ef2ca |
+ {
|
|
|
3ef2ca |
+ if (used_file_indexes != NULL)
|
|
|
3ef2ca |
+ free(used_file_indexes);
|
|
|
3ef2ca |
used_file_indexes = malloc(argc * sizeof(int));
|
|
|
3ef2ca |
+ }
|
|
|
3ef2ca |
|
|
|
3ef2ca |
if (argvp != NULL)
|
|
|
3ef2ca |
*argvp = argv;
|
|
|
3ef2ca |
*** ../vim-7.4.431/src/main.c 2014-08-10 13:34:59.056785459 +0200
|
|
|
3ef2ca |
--- src/main.c 2014-09-09 12:16:09.016500642 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 178,183 ****
|
|
|
3ef2ca |
--- 178,191 ----
|
|
|
3ef2ca |
*/
|
|
|
3ef2ca |
mch_early_init();
|
|
|
3ef2ca |
|
|
|
3ef2ca |
+ #if defined(WIN32) && defined(FEAT_MBYTE)
|
|
|
3ef2ca |
+ /*
|
|
|
3ef2ca |
+ * MingW expands command line arguments, which confuses our code to
|
|
|
3ef2ca |
+ * convert when 'encoding' changes. Get the unexpanded arguments.
|
|
|
3ef2ca |
+ */
|
|
|
3ef2ca |
+ argc = get_cmd_argsW(&argv);
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
+
|
|
|
3ef2ca |
/* Many variables are in "params" so that we can pass them to invoked
|
|
|
3ef2ca |
* functions without a lot of arguments. "argc" and "argv" are also
|
|
|
3ef2ca |
* copied, so that they can be changed. */
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1496,1501 ****
|
|
|
3ef2ca |
--- 1504,1512 ----
|
|
|
3ef2ca |
if (garbage_collect_at_exit)
|
|
|
3ef2ca |
garbage_collect();
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
+ #if defined(WIN32) && defined(FEAT_MBYTE)
|
|
|
3ef2ca |
+ free_cmd_argsW();
|
|
|
3ef2ca |
+ #endif
|
|
|
3ef2ca |
|
|
|
3ef2ca |
mch_exit(exitval);
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
*** ../vim-7.4.431/src/os_mswin.c 2014-03-19 12:37:18.537826062 +0100
|
|
|
3ef2ca |
--- src/os_mswin.c 2014-09-09 12:17:25.696500810 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 277,286 ****
|
|
|
3ef2ca |
AnsiUpperBuff(toupper_tab, 256);
|
|
|
3ef2ca |
AnsiLowerBuff(tolower_tab, 256);
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
-
|
|
|
3ef2ca |
- #if defined(FEAT_MBYTE) && !defined(FEAT_GUI)
|
|
|
3ef2ca |
- (void)get_cmd_argsW(NULL);
|
|
|
3ef2ca |
- #endif
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--- 277,282 ----
|
|
|
3ef2ca |
*** ../vim-7.4.431/src/version.c 2014-09-09 12:21:57.716501404 +0200
|
|
|
3ef2ca |
--- src/version.c 2014-09-09 12:24:38.440501755 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 743,744 ****
|
|
|
3ef2ca |
--- 743,746 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 432,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
hundred-and-one symptoms of being an internet addict:
|
|
|
3ef2ca |
106. When told to "go to your room" you inform your parents that you
|
|
|
3ef2ca |
can't...because you were kicked out and banned.
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|