summaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-28 14:11:42 +0200
committerBram Moolenaar <Bram@vim.org>2016-03-28 14:11:42 +0200
commit46c00a6565b8f1f4b7b1041d03eaceaf6ffc4aee (patch)
tree097071177477e304c3f7e1438c090ba8ff72bfbf /src/json.c
parent8038568722a0aad72d001edf4972c29abab57f8f (diff)
patch 7.4.1666v7.4.1666
Problem: When reading JSON from a channel all readahead is used. Solution: Use the fill function to reduce overhead.
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c
index 9738fc5fec..b4ebe74146 100644
--- a/src/json.c
+++ b/src/json.c
@@ -350,8 +350,10 @@ json_skip_white(js_read_T *reader)
if (reader->js_fill != NULL && c == NUL)
{
if (reader->js_fill(reader))
+ {
reader->js_end = reader->js_buf + STRLEN(reader->js_buf);
- continue;
+ continue;
+ }
}
if (c == NUL || c > ' ')
break;