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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201906282007.x5SK7Isu005543%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui