diff src/optionstr.c @ 31962:4efcb5c68112 v9.0.1313

patch 9.0.1313: some settings use the current codepage instead of 'encoding' Commit: https://github.com/vim/vim/commit/ce3189d56e867a2ffc077893b62f530d5b09150f Author: K.Takata <kentkt@csc.jp> Date: Wed Feb 15 19:13:43 2023 +0000 patch 9.0.1313: some settings use the current codepage instead of 'encoding' Problem: Some settings use the current codepage instead of 'encoding'. Solution: Adjust how options are initialized. (Ken Takata, closes https://github.com/vim/vim/issues/11992)
author Bram Moolenaar <Bram@vim.org>
date Wed, 15 Feb 2023 20:15:03 +0100
parents b0717fcca5eb
children ca6bc7c04163
line wrap: on
line diff
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -1054,9 +1054,12 @@ did_set_encoding(char_u **varp, char_u *
 	}
 
 #if defined(MSWIN)
-	// $HOME may have characters in active code page.
+	// $HOME, $VIM and $VIMRUNTIME may have characters in active code page.
 	if (varp == &p_enc)
+	{
 	    init_homedir();
+	    init_vimdir();
+	}
 #endif
     }