aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index f032604a59..6b50b031a3 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -1620,7 +1620,7 @@ failed:
save_file_ff(curbuf);
// If editing a new file: set 'fenc' for the current buffer.
// Also for ":read ++edit file".
- set_string_option_direct(kOptFileencoding, fenc, OPT_LOCAL, 0);
+ set_option_direct(kOptFileencoding, CSTR_AS_OPTVAL(fenc), OPT_LOCAL, 0);
}
if (fenc_alloced) {
xfree(fenc);
@@ -1968,7 +1968,7 @@ void set_forced_fenc(exarg_T *eap)
}
char *fenc = enc_canonize(eap->cmd + eap->force_enc);
- set_string_option_direct(kOptFileencoding, fenc, OPT_LOCAL, 0);
+ set_option_direct(kOptFileencoding, CSTR_AS_OPTVAL(fenc), OPT_LOCAL, 0);
xfree(fenc);
}