Patch 9.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)
Files:      src/gui_gtk_x11.c, src/gui_w32.c


*** ../vim-9.0.0596/src/gui_gtk_x11.c   2022-09-17 21:07:52.095993168 +0100
--- src/gui_gtk_x11.c   2022-09-26 20:36:14.890122328 +0100
***************
*** 3345,3350 ****
--- 3345,3356 ----
                send_tabline_event(x < 50 ? -1 : 0);
            }
        }
+       else if (bevent->button == 2)
+       {
+           if (clicked_page != 0)
+               // Middle mouse click on tabpage label closes that tab.
+               send_tabline_menu_event(clicked_page, TABLINE_MENU_CLOSE);
+       }
      }
  
      // We didn't handle the event.
*** ../vim-9.0.0596/src/gui_w32.c       2022-09-10 13:03:08.959148178 +0100
--- src/gui_w32.c       2022-09-26 20:40:38.854129533 +0100
***************
*** 8094,8099 ****
--- 8094,8113 ----
                }
                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;
      }
*** ../vim-9.0.0596/src/version.c       2022-09-26 20:17:22.388415107 +0100
--- src/version.c       2022-09-26 20:48:12.323431439 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     597,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
184. You no longer ask prospective dates what their sign is, instead
     your line is "Hi, what's your URL?"

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220926194901.85F421C0413%40moolenaar.net.

Raspunde prin e-mail lui