Mercurial > vim
comparison src/channel.c @ 10422:e664ee056a84 v8.0.0105
commit https://github.com/vim/vim/commit/4b785f69c0616dba5d3f38e8ce4b5398cec89407
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 29 21:54:44 2016 +0100
patch 8.0.0105
Problem: When using ch_read() with zero timeout, can't tell the difference
between reading an empty line and nothing available.
Solution: Add ch_canread().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 29 Nov 2016 22:00:05 +0100 |
parents | 56cb9538386c |
children | acfc83aca8ee |
comparison
equal
deleted
inserted
replaced
10421:474ff13f3ec3 | 10422:e664ee056a84 |
---|---|
2601 } | 2601 } |
2602 | 2602 |
2603 /* | 2603 /* |
2604 * Return TRUE if "channel" has JSON or other typeahead. | 2604 * Return TRUE if "channel" has JSON or other typeahead. |
2605 */ | 2605 */ |
2606 static int | 2606 int |
2607 channel_has_readahead(channel_T *channel, ch_part_T part) | 2607 channel_has_readahead(channel_T *channel, ch_part_T part) |
2608 { | 2608 { |
2609 ch_mode_T ch_mode = channel->ch_part[part].ch_mode; | 2609 ch_mode_T ch_mode = channel->ch_part[part].ch_mode; |
2610 | 2610 |
2611 if (ch_mode == MODE_JSON || ch_mode == MODE_JS) | 2611 if (ch_mode == MODE_JSON || ch_mode == MODE_JS) |