diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-12 16:56:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-12 16:56:12 +0100 |
commit | d327b0c68fa9b32877123f77560f4521a9eb39db (patch) | |
tree | 907a05e09b8c85b5e7d440ac82cf16755a8c6171 /src/ui.c | |
parent | f8c53d3d268fc67a29c8c1a4e76fae85762e11b5 (diff) | |
download | vim-git-d327b0c68fa9b32877123f77560f4521a9eb39db.tar.gz |
patch 8.0.1292: quick clicks in the WinBar start Visual modev8.0.1292
Problem: Quick clicks in the WinBar start Visual mode.
Solution: Use a double click in the WinBar like a normal click.
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -2653,6 +2653,21 @@ retnomove: return IN_STATUS_LINE; if (on_sep_line) return IN_SEP_LINE; +#ifdef FEAT_MENU + if (in_winbar) + { + /* A quick second click may arrive as a double-click, but we use it + * as a second click in the WinBar. */ + if ((mod_mask & MOD_MASK_MULTI_CLICK) && !(flags & MOUSE_RELEASED)) + { + wp = mouse_find_win(&row, &col); + if (wp == NULL) + return IN_UNKNOWN; + winbar_click(wp, col); + } + return IN_OTHER_WIN | MOUSE_WINBAR; + } +#endif if (flags & MOUSE_MAY_STOP_VIS) { end_visual_mode(); |