diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-02-22 21:25:37 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-02-22 21:25:37 +0000 |
commit | d1f56e68f1315687ff5b913e2577f11b0b620573 (patch) | |
tree | adbac0a00c07ee933058543eb3f251a83e707624 /src/fileio.c | |
parent | 238a564935abe36832b267f32b5487556c640d00 (diff) | |
download | vim-git-d1f56e68f1315687ff5b913e2577f11b0b620573.tar.gz |
updated for version 7.0204v7.0204
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 |