Mercurial > vim
comparison src/getchar.c @ 1618:46bbe11644e0
updated for version 7.2a
author | vimboss |
---|---|
date | Tue, 24 Jun 2008 20:19:36 +0000 |
parents | ceaf71b15d81 |
children | b60a569eb708 |
comparison
equal
deleted
inserted
replaced
1617:5f0c7aae4da2 | 1618:46bbe11644e0 |
---|---|
219 * K_SPECIAL and CSI in the returned string are escaped. | 219 * K_SPECIAL and CSI in the returned string are escaped. |
220 */ | 220 */ |
221 char_u * | 221 char_u * |
222 get_inserted() | 222 get_inserted() |
223 { | 223 { |
224 return(get_buffcont(&redobuff, FALSE)); | 224 return get_buffcont(&redobuff, FALSE); |
225 } | 225 } |
226 | 226 |
227 /* | 227 /* |
228 * Add string "s" after the current block of buffer "buf". | 228 * Add string "s" after the current block of buffer "buf". |
229 * K_SPECIAL and CSI should have been escaped already. | 229 * K_SPECIAL and CSI should have been escaped already. |
2231 } | 2231 } |
2232 | 2232 |
2233 if ((mp == NULL || max_mlen >= mp_match_len) | 2233 if ((mp == NULL || max_mlen >= mp_match_len) |
2234 && keylen != KL_PART_MAP) | 2234 && keylen != KL_PART_MAP) |
2235 { | 2235 { |
2236 int save_keylen = keylen; | |
2237 | |
2236 /* | 2238 /* |
2237 * When no matching mapping found or found a | 2239 * When no matching mapping found or found a |
2238 * non-matching mapping that matches at least what the | 2240 * non-matching mapping that matches at least what the |
2239 * matching mapping matched: | 2241 * matching mapping matched: |
2240 * Check if we have a terminal code, when: | 2242 * Check if we have a terminal code, when: |
2249 || (p_remap && typebuf.tb_noremap[ | 2251 || (p_remap && typebuf.tb_noremap[ |
2250 typebuf.tb_off] == RM_YES)) | 2252 typebuf.tb_off] == RM_YES)) |
2251 && !timedout) | 2253 && !timedout) |
2252 { | 2254 { |
2253 keylen = check_termcode(max_mlen + 1, NULL, 0); | 2255 keylen = check_termcode(max_mlen + 1, NULL, 0); |
2256 | |
2257 /* If no termcode matched but 'pastetoggle' | |
2258 * matched partially it's like an incomplete key | |
2259 * sequence. */ | |
2260 if (keylen == 0 && save_keylen == KL_PART_KEY) | |
2261 keylen = KL_PART_KEY; | |
2254 | 2262 |
2255 /* | 2263 /* |
2256 * When getting a partial match, but the last | 2264 * When getting a partial match, but the last |
2257 * characters were not typed, don't wait for a | 2265 * characters were not typed, don't wait for a |
2258 * typed character to complete the termcode. | 2266 * typed character to complete the termcode. |
2291 } | 2299 } |
2292 if (keylen >= 0) | 2300 if (keylen >= 0) |
2293 #endif | 2301 #endif |
2294 /* When there was a matching mapping and no | 2302 /* When there was a matching mapping and no |
2295 * termcode could be replaced after another one, | 2303 * termcode could be replaced after another one, |
2296 * use that mapping. */ | 2304 * use that mapping (loop around). If there was |
2305 * no mapping use the character from the | |
2306 * typeahead buffer right here. */ | |
2297 if (mp == NULL) | 2307 if (mp == NULL) |
2298 { | 2308 { |
2299 /* | 2309 /* |
2300 * get a character: 2. from the typeahead buffer | 2310 * get a character: 2. from the typeahead buffer |
2301 */ | 2311 */ |
2881 #ifdef FEAT_EVAL | 2891 #ifdef FEAT_EVAL |
2882 && !ignore_script | 2892 && !ignore_script |
2883 #endif | 2893 #endif |
2884 ) | 2894 ) |
2885 { | 2895 { |
2896 | |
2897 #if defined(FEAT_NETBEANS_INTG) | |
2898 /* Process the queued netbeans messages. */ | |
2899 netbeans_parse_messages(); | |
2900 #endif | |
2901 | |
2886 if (got_int || (script_char = getc(scriptin[curscript])) < 0) | 2902 if (got_int || (script_char = getc(scriptin[curscript])) < 0) |
2887 { | 2903 { |
2888 /* Reached EOF. | 2904 /* Reached EOF. |
2889 * Careful: closescript() frees typebuf.tb_buf[] and buf[] may | 2905 * Careful: closescript() frees typebuf.tb_buf[] and buf[] may |
2890 * point inside typebuf.tb_buf[]. Don't use buf[] after this! */ | 2906 * point inside typebuf.tb_buf[]. Don't use buf[] after this! */ |
3845 } | 3861 } |
3846 } | 3862 } |
3847 while (++len <= 3) | 3863 while (++len <= 3) |
3848 msg_putchar(' '); | 3864 msg_putchar(' '); |
3849 | 3865 |
3850 /* Get length of what we write */ | 3866 /* Display the LHS. Get length of what we write. */ |
3851 len = msg_outtrans_special(mp->m_keys, TRUE); | 3867 len = msg_outtrans_special(mp->m_keys, TRUE); |
3852 do | 3868 do |
3853 { | 3869 { |
3854 msg_putchar(' '); /* padd with blanks */ | 3870 msg_putchar(' '); /* padd with blanks */ |
3855 ++len; | 3871 ++len; |