Mercurial > vim
comparison src/gui.c @ 87:014ba200db86
updated for version 7.0035
author | vimboss |
---|---|
date | Sat, 08 Jan 2005 21:45:39 +0000 |
parents | 4a6de0783bb5 |
children | 2f5a3b881ada |
comparison
equal
deleted
inserted
replaced
86:8173ec1e9f1f | 87:014ba200db86 |
---|---|
4199 { | 4199 { |
4200 int x, y; | 4200 int x, y; |
4201 win_T *wp = NULL; | 4201 win_T *wp = NULL; |
4202 | 4202 |
4203 need_mouse_correct = FALSE; | 4203 need_mouse_correct = FALSE; |
4204 if (gui.in_use && p_mousef) | 4204 |
4205 { | 4205 if (!(gui.in_use && p_mousef)) |
4206 x = gui_mch_get_mouse_x(); | 4206 return; |
4207 /* Don't move the mouse when it's left or right of the Vim window */ | 4207 |
4208 if (x < 0 || x > Columns * gui.char_width) | 4208 gui_mch_getmouse(&x, &y); |
4209 return; | 4209 /* Don't move the mouse when it's left or right of the Vim window */ |
4210 y = gui_mch_get_mouse_y(); | 4210 if (x < 0 || x > Columns * gui.char_width) |
4211 if (y >= 0) | 4211 return; |
4212 wp = xy2win(x, y); | 4212 if (y >= 0) |
4213 if (wp != curwin && wp != NULL) /* If in other than current window */ | 4213 wp = xy2win(x, y); |
4214 { | 4214 if (wp != curwin && wp != NULL) /* If in other than current window */ |
4215 validate_cline_row(); | 4215 { |
4216 gui_mch_setmouse((int)W_ENDCOL(curwin) * gui.char_width - 3, | 4216 validate_cline_row(); |
4217 (W_WINROW(curwin) + curwin->w_wrow) * gui.char_height | 4217 gui_mch_setmouse((int)W_ENDCOL(curwin) * gui.char_width - 3, |
4218 (W_WINROW(curwin) + curwin->w_wrow) * gui.char_height | |
4218 + (gui.char_height) / 2); | 4219 + (gui.char_height) / 2); |
4219 } | |
4220 } | 4220 } |
4221 } | 4221 } |
4222 | 4222 |
4223 /* | 4223 /* |
4224 * Find window where the mouse pointer "y" coordinate is in. | 4224 * Find window where the mouse pointer "y" coordinate is in. |