Mercurial > vim
comparison src/normal.c @ 2130:279380a812ad v7.2.412
updated for version 7.2.412
Problem: [ or ] followed by mouse click doesn't work.
Solution: Reverse check for key being a mouse event. (Dominique Pelle)
author | Bram Moolenaar <bram@zimbu.org> |
---|---|
date | Fri, 07 May 2010 15:52:08 +0200 |
parents | 6b5d641bcdd4 |
children | 35effbd07a25 |
comparison
equal
deleted
inserted
replaced
2129:24100651daa9 | 2130:279380a812ad |
---|---|
3194 | 3194 |
3195 /* | 3195 /* |
3196 * There are a few special cases where we want certain combinations of | 3196 * There are a few special cases where we want certain combinations of |
3197 * characters to be considered as a single word. These are things like | 3197 * characters to be considered as a single word. These are things like |
3198 * "->", "/ *", "*=", "+=", "&=", "<=", ">=", "!=" etc. Otherwise, each | 3198 * "->", "/ *", "*=", "+=", "&=", "<=", ">=", "!=" etc. Otherwise, each |
3199 * character is in it's own class. | 3199 * character is in its own class. |
3200 */ | 3200 */ |
3201 if (c != NUL && vim_strchr((char_u *)"-+*/%<>&|^!=", c) != NULL) | 3201 if (c != NUL && vim_strchr((char_u *)"-+*/%<>&|^!=", c) != NULL) |
3202 return 1; | 3202 return 1; |
3203 return c; | 3203 return c; |
3204 } | 3204 } |
4083 #endif /* #ifdef FEAT_SCROLLBIND */ | 4083 #endif /* #ifdef FEAT_SCROLLBIND */ |
4084 | 4084 |
4085 /* | 4085 /* |
4086 * Command character that's ignored. | 4086 * Command character that's ignored. |
4087 * Used for CTRL-Q and CTRL-S to avoid problems with terminals that use | 4087 * Used for CTRL-Q and CTRL-S to avoid problems with terminals that use |
4088 * xon/xoff | 4088 * xon/xoff. |
4089 */ | 4089 */ |
4090 static void | 4090 static void |
4091 nv_ignore(cap) | 4091 nv_ignore(cap) |
4092 cmdarg_T *cap; | 4092 cmdarg_T *cap; |
4093 { | 4093 { |
6521 #ifdef FEAT_MOUSE | 6521 #ifdef FEAT_MOUSE |
6522 /* | 6522 /* |
6523 * [ or ] followed by a middle mouse click: put selected text with | 6523 * [ or ] followed by a middle mouse click: put selected text with |
6524 * indent adjustment. Any other button just does as usual. | 6524 * indent adjustment. Any other button just does as usual. |
6525 */ | 6525 */ |
6526 else if (cap->nchar >= K_LEFTMOUSE && cap->nchar <= K_RIGHTRELEASE) | 6526 else if (cap->nchar >= K_RIGHTRELEASE && cap->nchar <= K_LEFTMOUSE) |
6527 { | 6527 { |
6528 (void)do_mouse(cap->oap, cap->nchar, | 6528 (void)do_mouse(cap->oap, cap->nchar, |
6529 (cap->cmdchar == ']') ? FORWARD : BACKWARD, | 6529 (cap->cmdchar == ']') ? FORWARD : BACKWARD, |
6530 cap->count1, PUT_FIXINDENT); | 6530 cap->count1, PUT_FIXINDENT); |
6531 } | 6531 } |