To: vim_dev@googlegroups.com Subject: Patch 8.1.1605 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1605 Problem: Vim may delay processing messages on a json channel. (Pontus Leitzler) Solution: Try parsing json when checking if there is readahead. Files: src/channel.c *** ../vim-8.1.1604/src/channel.c 2019-06-24 00:43:31.455691858 +0200 --- src/channel.c 2019-06-28 22:03:13.103120604 +0200 *************** *** 2851,2859 **** if (ch_mode == MODE_JSON || ch_mode == MODE_JS) { jsonq_T *head = &channel->ch_part[part].ch_json_head; - jsonq_T *item = head->jq_next; ! return item != NULL; } return channel_peek(channel, part) != NULL; } --- 2851,2863 ---- if (ch_mode == MODE_JSON || ch_mode == MODE_JS) { jsonq_T *head = &channel->ch_part[part].ch_json_head; ! if (head->jq_next == NULL) ! // Parse json from readahead, there might be a complete message to ! // process. ! channel_parse_json(channel, part); ! ! return head->jq_next != NULL; } return channel_peek(channel, part) != NULL; } *** ../vim-8.1.1604/src/version.c 2019-06-28 21:55:44.597350995 +0200 --- src/version.c 2019-06-28 22:05:22.946463270 +0200 *************** *** 779,780 **** --- 779,782 ---- { /* Add new patch number below this line */ + /**/ + 1605, /**/ -- Facepalm statement #4: "3000 year old graves? That's not possible, it's only 2014!" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///