Mercurial > vim
comparison src/getchar.c @ 9205:c19eb05b19df v7.4.1886
commit https://github.com/vim/vim/commit/cda7764d8e65325d4524e5d6c3174121eeb12cad
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 4 13:32:35 2016 +0200
patch 7.4.1886
Problem: When waiting for a character is interrupted by receiving channel
data and the first character of a mapping was typed, the mapping
times out. (Ramel Eshed)
Solution: When dealing with channel data don't return from mch_inchar().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 04 Jun 2016 13:45:05 +0200 |
parents | 7350959e53c3 |
children | ea504064c996 |
comparison
equal
deleted
inserted
replaced
9204:61b9dfe91682 | 9205:c19eb05b19df |
---|---|
127 static void closescript(void); | 127 static void closescript(void); |
128 static int vgetorpeek(int); | 128 static int vgetorpeek(int); |
129 static void map_free(mapblock_T **); | 129 static void map_free(mapblock_T **); |
130 static void validate_maphash(void); | 130 static void validate_maphash(void); |
131 static void showmap(mapblock_T *mp, int local); | 131 static void showmap(mapblock_T *mp, int local); |
132 static int inchar(char_u *buf, int maxlen, long wait_time, int tb_change_cnt); | |
132 #ifdef FEAT_EVAL | 133 #ifdef FEAT_EVAL |
133 static char_u *eval_map_expr(char_u *str, int c); | 134 static char_u *eval_map_expr(char_u *str, int c); |
134 #endif | 135 #endif |
135 | 136 |
136 /* | 137 /* |
2939 * If wait_time == -1 we wait forever for a character to arrive. | 2940 * If wait_time == -1 we wait forever for a character to arrive. |
2940 * | 2941 * |
2941 * Return the number of obtained characters. | 2942 * Return the number of obtained characters. |
2942 * Return -1 when end of input script reached. | 2943 * Return -1 when end of input script reached. |
2943 */ | 2944 */ |
2944 int | 2945 static int |
2945 inchar( | 2946 inchar( |
2946 char_u *buf, | 2947 char_u *buf, |
2947 int maxlen, | 2948 int maxlen, |
2948 long wait_time, /* milli seconds */ | 2949 long wait_time, /* milli seconds */ |
2949 int tb_change_cnt) | 2950 int tb_change_cnt) |