0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1617

Problem:    When a JSON message is split it isn't decoded.
Solution:   Wait a short time for the rest of the message to arrive.
This commit is contained in:
Bram Moolenaar
2016-03-20 16:40:37 +01:00
parent ac74d5e86c
commit ba61ac0d61
6 changed files with 181 additions and 35 deletions

View File

@@ -877,8 +877,9 @@ json_decode_all(js_read_T *reader, typval_T *res, int options)
/*
* Decode the JSON from "reader" and store the result in "res".
* "options" can be JSON_JS or zero;
* Return FAIL if the message has a decoding error or the message is
* truncated. Consumes the message anyway.
* Return FAIL for a decoding error.
* Return MAYBE for an incomplete message.
* Consumes the message anyway.
*/
int
json_decode(js_read_T *reader, typval_T *res, int options)
@@ -891,7 +892,7 @@ json_decode(js_read_T *reader, typval_T *res, int options)
ret = json_decode_item(reader, res, options);
json_skip_white(reader);
return ret == OK ? OK : FAIL;
return ret;
}
/*