diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-04-24 22:04:21 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-04-24 22:04:21 +0000 |
commit | c91506a0333241681f7564d0d46bb85b793d94b4 (patch) | |
tree | dbbfa44758a5dc2d018bf19fa629607d15e44532 /src/misc2.c | |
parent | 2a489f5fdd1be0b2abfb5d300e38bad425d4b456 (diff) | |
download | vim-git-c91506a0333241681f7564d0d46bb85b793d94b4.tar.gz |
updated for version 7.0071
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/misc2.c b/src/misc2.c index 0735e2963..a00d3ae49 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -2474,11 +2474,15 @@ get_pseudo_mouse_code(button, is_click, is_drag) && is_drag == mouse_table[i].is_drag) { #ifdef FEAT_GUI - /* Trick: a non mappable left click and release has mouse_col < 0. - * Used for 'mousefocus' in gui_mouse_moved() */ - if (mouse_col < 0) + /* Trick: a non mappable left click and release has mouse_col -1 + * or added MOUSE_COLOFF. Used for 'mousefocus' in + * gui_mouse_moved() */ + if (mouse_col < 0 || mouse_col > MOUSE_COLOFF) { - mouse_col = 0; + if (mouse_col < 0) + mouse_col = 0; + else + mouse_col -= MOUSE_COLOFF; if (mouse_table[i].pseudo_code == (int)KE_LEFTMOUSE) return (int)KE_LEFTMOUSE_NM; if (mouse_table[i].pseudo_code == (int)KE_LEFTRELEASE) |