jobsend: Don't append extra newline after last item

This allows sending binary data that is not newline terminated
This commit is contained in:
Björn Linse
2015-02-28 13:39:26 +01:00
parent 6b7ece6cc8
commit 5be040ffe4
3 changed files with 18 additions and 6 deletions

View File

@@ -10656,7 +10656,7 @@ static void f_jobsend(typval_T *argvars, typval_T *rettv)
}
ssize_t input_len;
char *input = (char *) save_tv_as_string(&argvars[1], &input_len, true);
char *input = (char *) save_tv_as_string(&argvars[1], &input_len, false);
if (!input) {
// Either the error has been handled by save_tv_as_string(), or there is no
// input to send.