Mercurial > vim
comparison src/normal.c @ 203:80000fb16feb
updated for version 7.0060
author | vimboss |
---|---|
date | Tue, 15 Mar 2005 22:34:55 +0000 |
parents | 476198990769 |
children | da182deebec7 |
comparison
equal
deleted
inserted
replaced
202:b6450bf509d8 | 203:80000fb16feb |
---|---|
169 #ifdef FEAT_NETBEANS_INTG | 169 #ifdef FEAT_NETBEANS_INTG |
170 static void nv_nbcmd __ARGS((cmdarg_T *cap)); | 170 static void nv_nbcmd __ARGS((cmdarg_T *cap)); |
171 #endif | 171 #endif |
172 #ifdef FEAT_DND | 172 #ifdef FEAT_DND |
173 static void nv_drop __ARGS((cmdarg_T *cap)); | 173 static void nv_drop __ARGS((cmdarg_T *cap)); |
174 #endif | |
175 #ifdef FEAT_AUTOCMD | |
176 static void nv_cursorhold __ARGS((cmdarg_T *cap)); | |
174 #endif | 177 #endif |
175 | 178 |
176 /* | 179 /* |
177 * Function to be called for a Normal or Visual mode command. | 180 * Function to be called for a Normal or Visual mode command. |
178 * The argument is a cmdarg_T. | 181 * The argument is a cmdarg_T. |
432 {K_F21, nv_nbcmd, NV_NCH_ALW, 0}, | 435 {K_F21, nv_nbcmd, NV_NCH_ALW, 0}, |
433 #endif | 436 #endif |
434 #ifdef FEAT_DND | 437 #ifdef FEAT_DND |
435 {K_DROP, nv_drop, NV_STS, 0}, | 438 {K_DROP, nv_drop, NV_STS, 0}, |
436 #endif | 439 #endif |
440 #ifdef FEAT_AUTOCMD | |
441 {K_CURSORHOLD, nv_cursorhold, 0, 0}, | |
442 #endif | |
437 }; | 443 }; |
438 | 444 |
439 /* Number of commands in nv_cmds[]. */ | 445 /* Number of commands in nv_cmds[]. */ |
440 #define NV_CMDS_SIZE (sizeof(nv_cmds) / sizeof(struct nv_cmd)) | 446 #define NV_CMDS_SIZE (sizeof(nv_cmds) / sizeof(struct nv_cmd)) |
441 | 447 |
1074 * actually displayed, otherwise this will slow down a lot when executing | 1080 * actually displayed, otherwise this will slow down a lot when executing |
1075 * mappings. | 1081 * mappings. |
1076 */ | 1082 */ |
1077 if (need_flushbuf) | 1083 if (need_flushbuf) |
1078 out_flush(); | 1084 out_flush(); |
1085 #endif | |
1086 #ifdef FEAT_AUTOCMD | |
1087 did_cursorhold = FALSE; | |
1079 #endif | 1088 #endif |
1080 | 1089 |
1081 State = NORMAL; | 1090 State = NORMAL; |
1082 | 1091 |
1083 if (ca.nchar == ESC) | 1092 if (ca.nchar == ESC) |
8650 cmdarg_T *cap; | 8659 cmdarg_T *cap; |
8651 { | 8660 { |
8652 do_put('~', BACKWARD, 1L, PUT_CURSEND); | 8661 do_put('~', BACKWARD, 1L, PUT_CURSEND); |
8653 } | 8662 } |
8654 #endif | 8663 #endif |
8664 | |
8665 #ifdef FEAT_AUTOCMD | |
8666 /* | |
8667 * Trigger CursorHold event. | |
8668 * When waiting for a character for 'updatetime' K_CURSORHOLD is put in the | |
8669 * input buffer. "did_cursorhold" is set to avoid retriggering. | |
8670 */ | |
8671 /*ARGSUSED*/ | |
8672 static void | |
8673 nv_cursorhold(cap) | |
8674 cmdarg_T *cap; | |
8675 { | |
8676 apply_autocmds(EVENT_CURSORHOLD, NULL, NULL, FALSE, curbuf); | |
8677 did_cursorhold = TRUE; | |
8678 } | |
8679 #endif | |
8680 |