summaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-04 22:57:29 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-04 22:57:29 +0200
commit333b80acf3a44e462456e6d5730e47ffa449c83d (patch)
tree24070cc76ef5b978aabc38db366e04e0dbed591d /src/fileio.c
parent1f8495cf48888ff3a8ab3d0eb22db92389191a60 (diff)
patch 8.0.1660: the terminal API "drop" command doesn't support optionsv8.0.1660
Problem: The terminal API "drop" command doesn't support options. Solution: Implement the options.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 05c3df50bc..e2fa3e22b6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2779,22 +2779,22 @@ readfile_linenr(
int
prep_exarg(exarg_T *eap, buf_T *buf)
{
- eap->cmd = alloc((unsigned)(STRLEN(buf->b_p_ff)
+ eap->cmd = alloc(15
#ifdef FEAT_MBYTE
- + STRLEN(buf->b_p_fenc)
+ + (unsigned)STRLEN(buf->b_p_fenc)
#endif
- + 15));
+ );
if (eap->cmd == NULL)
return FAIL;
#ifdef FEAT_MBYTE
- sprintf((char *)eap->cmd, "e ++ff=%s ++enc=%s", buf->b_p_ff, buf->b_p_fenc);
- eap->force_enc = 14 + (int)STRLEN(buf->b_p_ff);
+ sprintf((char *)eap->cmd, "e ++enc=%s", buf->b_p_fenc);
+ eap->force_enc = 8;
eap->bad_char = buf->b_bad_char;
#else
- sprintf((char *)eap->cmd, "e ++ff=%s", buf->b_p_ff);
+ sprintf((char *)eap->cmd, "e");
#endif
- eap->force_ff = 7;
+ eap->force_ff = *buf->b_p_ff;
eap->force_bin = buf->b_p_bin ? FORCE_BIN : FORCE_NOBIN;
eap->read_edit = FALSE;