Mercurial > vim
diff src/fileio.c @ 681:9364d114ed8d v7.0204
updated for version 7.0204
author | vimboss |
---|---|
date | Wed, 22 Feb 2006 21:25:37 +0000 |
parents | e629de7618da |
children | 07d199fe02ed |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -583,8 +583,13 @@ readfile(fname, sfname, from, lines_to_s /* set forced 'fileencoding' */ fenc = enc_canonize(eap->cmd + eap->force_enc); if (fenc != NULL) + { set_string_option_direct((char_u *)"fenc", -1, fenc, OPT_FREE|OPT_LOCAL); +# ifdef FEAT_EVAL + set_option_scriptID((char_u *)"fenc", current_SID); +# endif + } vim_free(fenc); } #endif @@ -2108,8 +2113,13 @@ failed: #ifdef FEAT_MBYTE /* If editing a new file: set 'fenc' for the current buffer. */ if (newfile) + { set_string_option_direct((char_u *)"fenc", -1, fenc, OPT_FREE|OPT_LOCAL); +# ifdef FEAT_EVAL + set_option_scriptID((char_u *)"fenc", current_SID); +# endif + } if (fenc_alloced) vim_free(fenc); # ifdef USE_ICONV