diff options
author | regomne <fallingsunz@gmail.com> | 2022-09-26 20:48:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-26 20:48:32 +0100 |
commit | 3bdef10dc1c836e5e5a6fdcc1c21155cbd80d798 (patch) | |
tree | 4d6024d828f95196c03015c809673440c0c0a123 /src/gui_w32.c | |
parent | 7381c0ce3f3e79ec5a74b9be8fc34e0c8181463b (diff) |
patch 9.0.0597: cannot close a tab page with the middle mouse buttonv9.0.0597
Problem: Cannot close a tab page with the middle mouse button.
Solution: Support closing a tab page with the middle mouse button, like many
other programs. (closes #10746)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index 203b8fa548..3ade63113b 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -8094,6 +8094,20 @@ tabline_wndproc( } break; } + case WM_MBUTTONUP: + { + TCHITTESTINFO htinfo; + + htinfo.pt.x = GET_X_LPARAM(lParam); + htinfo.pt.y = GET_Y_LPARAM(lParam); + idx0 = TabCtrl_HitTest(hwnd, &htinfo); + if (idx0 != -1) + { + idx0 += 1; + send_tabline_menu_event(idx0, TABLINE_MENU_CLOSE); + } + break; + } default: break; } |