diff src/eval.c @ 13575:4df23d9bad47 v8.0.1660

patch 8.0.1660: the terminal API "drop" command doesn't support options commit https://github.com/vim/vim/commit/333b80acf3a44e462456e6d5730e47ffa449c83d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 4 22:57:29 2018 +0200 patch 8.0.1660: the terminal API "drop" command doesn't support options Problem: The terminal API "drop" command doesn't support options. Solution: Implement the options.
author Christian Brabandt <cb@256bit.org>
date Wed, 04 Apr 2018 23:00:07 +0200
parents 69517d67421f
children e76499e85744
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -6590,7 +6590,7 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
 	len += 7;
 
     if (eap->force_ff != 0)
-	len += (unsigned)STRLEN(eap->cmd + eap->force_ff) + 6;
+	len += 10; /* " ++ff=unix" */
 # ifdef FEAT_MBYTE
     if (eap->force_enc != 0)
 	len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
@@ -6614,7 +6614,9 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
 
     if (eap->force_ff != 0)
 	sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
-						eap->cmd + eap->force_ff);
+						eap->force_ff == 'u' ? "unix"
+						: eap->force_ff == 'd' ? "dos"
+						: "mac");
 #ifdef FEAT_MBYTE
     if (eap->force_enc != 0)
 	sprintf((char *)newval + STRLEN(newval), " ++enc=%s",