mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.0204
This commit is contained in:
10
src/fileio.c
10
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
|
||||
|
Reference in New Issue
Block a user