Mercurial > vim
comparison src/misc1.c @ 964:e905716f6a3a v7.0.090
updated for version 7.0-090
author | vimboss |
---|---|
date | Tue, 05 Sep 2006 18:57:57 +0000 |
parents | 3dc6072e0a25 |
children | f3669fbc9a31 |
comparison
equal
deleted
inserted
replaced
963:7644c80ca87b | 964:e905716f6a3a |
---|---|
3014 #define CBUFLEN 151 | 3014 #define CBUFLEN 151 |
3015 char_u buf[CBUFLEN]; | 3015 char_u buf[CBUFLEN]; |
3016 int len = 0; | 3016 int len = 0; |
3017 int n; | 3017 int n; |
3018 int save_mapped_ctrl_c = mapped_ctrl_c; | 3018 int save_mapped_ctrl_c = mapped_ctrl_c; |
3019 int waited = 0; | |
3019 | 3020 |
3020 mapped_ctrl_c = FALSE; /* mappings are not used here */ | 3021 mapped_ctrl_c = FALSE; /* mappings are not used here */ |
3021 for (;;) | 3022 for (;;) |
3022 { | 3023 { |
3023 cursor_on(); | 3024 cursor_on(); |
3032 if (n > 0) | 3033 if (n > 0) |
3033 { | 3034 { |
3034 /* Replace zero and CSI by a special key code. */ | 3035 /* Replace zero and CSI by a special key code. */ |
3035 n = fix_input_buffer(buf + len, n, FALSE); | 3036 n = fix_input_buffer(buf + len, n, FALSE); |
3036 len += n; | 3037 len += n; |
3037 } | 3038 waited = 0; |
3038 | 3039 } |
3039 /* incomplete termcode: get more characters */ | 3040 else if (len > 0) |
3040 if ((n = check_termcode(1, buf, len)) < 0) | 3041 ++waited; /* keep track of the waiting time */ |
3042 | |
3043 /* Incomplete termcode and not timed out yet: get more characters */ | |
3044 if ((n = check_termcode(1, buf, len)) < 0 | |
3045 && (!p_ttimeout || waited * 100L < (p_ttm < 0 ? p_tm : p_ttm))) | |
3041 continue; | 3046 continue; |
3047 | |
3042 /* found a termcode: adjust length */ | 3048 /* found a termcode: adjust length */ |
3043 if (n > 0) | 3049 if (n > 0) |
3044 len = n; | 3050 len = n; |
3045 if (len == 0) /* nothing typed yet */ | 3051 if (len == 0) /* nothing typed yet */ |
3046 continue; | 3052 continue; |