diff src/channel.c @ 8009:b2cfa3416ba0 v7.4.1299

commit https://github.com/vim/vim/commit/f6157284de71d8881f3b89fbd79d1ecbf842929f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 10 21:07:14 2016 +0100 patch 7.4.1299 Problem: When the server sends a message with ID zero the channel handler is not invoked. (Christian J. Robinson) Solution: Recognize zero value for the request ID. Add a test for invoking the channel handler.
author Christian Brabandt <cb@256bit.org>
date Wed, 10 Feb 2016 21:15:04 +0100
parents c1c9ab17e197
children ece323e2b57f
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -786,6 +786,7 @@ channel_get_json(int ch_idx, int id, typ
 
 	if ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id)
 	      || (id <= 0 && (tv->v_type != VAR_NUMBER
+			       || tv->vval.v_number == 0
 			       || tv->vval.v_number != channel->ch_block_id)))
 	{
 	    *rettv = item->value;