Patch 8.1.1605

10 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 28, 2019, 4:07:26 PM6/28/19
to vim...@googlegroups.com

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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages