summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/eval.c b/src/eval.c
index df83da5a8..492feba59 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -8526,46 +8526,46 @@ set_cmdarg(eap, oldarg)
unsigned len;
oldval = vimvars[VV_CMDARG].val;
- if (eap != NULL)
+ if (eap == NULL)
{
- if (eap->force_bin == FORCE_BIN)
- len = 6;
- else if (eap->force_bin == FORCE_NOBIN)
- len = 8;
- else
- len = 0;
- if (eap->force_ff != 0)
- len += (unsigned)STRLEN(eap->cmd + eap->force_ff) + 6;
+ vim_free(oldval);
+ vimvars[VV_CMDARG].val = oldarg;
+ return NULL;
+ }
+
+ if (eap->force_bin == FORCE_BIN)
+ len = 6;
+ else if (eap->force_bin == FORCE_NOBIN)
+ len = 8;
+ else
+ len = 0;
+ if (eap->force_ff != 0)
+ len += (unsigned)STRLEN(eap->cmd + eap->force_ff) + 6;
# ifdef FEAT_MBYTE
- if (eap->force_enc != 0)
- len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
+ if (eap->force_enc != 0)
+ len += (unsigned)STRLEN(eap->cmd + eap->force_enc) + 7;
# endif
- newval = alloc(len + 1);
- if (newval == NULL)
- return NULL;
+ newval = alloc(len + 1);
+ if (newval == NULL)
+ return NULL;
- if (eap->force_bin == FORCE_BIN)
- sprintf((char *)newval, " ++bin");
- else if (eap->force_bin == FORCE_NOBIN)
- sprintf((char *)newval, " ++nobin");
- else
- *newval = NUL;
- if (eap->force_ff != 0)
- sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
- eap->cmd + eap->force_ff);
+ if (eap->force_bin == FORCE_BIN)
+ sprintf((char *)newval, " ++bin");
+ else if (eap->force_bin == FORCE_NOBIN)
+ sprintf((char *)newval, " ++nobin");
+ else
+ *newval = NUL;
+ if (eap->force_ff != 0)
+ sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
+ eap->cmd + eap->force_ff);
# ifdef FEAT_MBYTE
- if (eap->force_enc != 0)
- sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
- eap->cmd + eap->force_enc);
+ if (eap->force_enc != 0)
+ sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
+ eap->cmd + eap->force_enc);
# endif
- vimvars[VV_CMDARG].val = newval;
- return oldval;
- }
-
- vim_free(oldval);
- vimvars[VV_CMDARG].val = oldarg;
- return NULL;
+ vimvars[VV_CMDARG].val = newval;
+ return oldval;
}
#endif