From d1f56e68f1315687ff5b913e2577f11b0b620573 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 22 Feb 2006 21:25:37 +0000 Subject: updated for version 7.0204 --- src/fileio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/fileio.c') diff --git a/src/fileio.c b/src/fileio.c index ed5a653d9..60c62d579 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -583,8 +583,13 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags) /* 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 -- cgit v1.2.1