comparison src/fileio.c @ 2976:cb4682b95909 v7.3.260

updated for version 7.3.260 Problem: CursorHold triggers on an incomplete mapping. (Will Gray) Solution: Don't trigger CursorHold when there is typeahead.
author Bram Moolenaar <bram@vim.org>
date Wed, 20 Jul 2011 18:29:39 +0200
parents d641f141f937
children df33dba4e553
comparison
equal deleted inserted replaced
2975:0f64f07947d7 2976:cb4682b95909
9042 int 9042 int
9043 trigger_cursorhold() 9043 trigger_cursorhold()
9044 { 9044 {
9045 int state; 9045 int state;
9046 9046
9047 if (!did_cursorhold && has_cursorhold() && !Recording 9047 if (!did_cursorhold
9048 && has_cursorhold()
9049 && !Recording
9050 && typebuf.tb_len == 0
9048 #ifdef FEAT_INS_EXPAND 9051 #ifdef FEAT_INS_EXPAND
9049 && !ins_compl_active() 9052 && !ins_compl_active()
9050 #endif 9053 #endif
9051 ) 9054 )
9052 { 9055 {
9933 for (type_start = pattern + 1; (c = *pattern); pattern++) 9936 for (type_start = pattern + 1; (c = *pattern); pattern++)
9934 { 9937 {
9935 if ((c == ';' || c == '>') && match == FALSE) 9938 if ((c == ';' || c == '>') && match == FALSE)
9936 { 9939 {
9937 *pattern = NUL; /* Terminate the string */ 9940 *pattern = NUL; /* Terminate the string */
9941 /* TODO: match with 'filetype' of buffer that "fname" comes
9942 * from. */
9938 match = mch_check_filetype(fname, type_start); 9943 match = mch_check_filetype(fname, type_start);
9939 *pattern = c; /* Restore the terminator */ 9944 *pattern = c; /* Restore the terminator */
9940 type_start = pattern + 1; 9945 type_start = pattern + 1;
9941 } 9946 }
9942 if (c == '>') 9947 if (c == '>')