diff options
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c index 443524885..748857423 100644 --- a/src/channel.c +++ b/src/channel.c @@ -2165,7 +2165,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv) int id = argv[id_idx].vval.v_number; if (tv != NULL) - json = json_encode_nr_expr(id, tv, options); + json = json_encode_nr_expr(id, tv, options | JSON_NL); if (tv == NULL || (json != NULL && *json == NUL)) { /* If evaluation failed or the result can't be encoded @@ -2175,7 +2175,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv) err_tv.v_type = VAR_STRING; err_tv.vval.v_string = (char_u *)"ERROR"; tv = &err_tv; - json = json_encode_nr_expr(id, tv, options); + json = json_encode_nr_expr(id, tv, options | JSON_NL); } if (json != NULL) { @@ -3500,7 +3500,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval) id = ++channel->ch_last_msg_id; text = json_encode_nr_expr(id, &argvars[1], - ch_mode == MODE_JS ? JSON_JS : 0); + (ch_mode == MODE_JS ? JSON_JS : 0) | JSON_NL); if (text == NULL) return; |