diff --git a/src/gui_mac.c b/src/gui_mac.c
index d05fddb..0acc3db 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -1776,7 +1776,7 @@
     newHeight = NewContentRect.bottom - NewContentRect.top;
     gui_resize_shell(newWidth, newHeight);
     gui_mch_set_bg_color(gui.back_pixel);
-    gui_set_shellsize(TRUE, FALSE);
+    gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
 }
 
 /*
@@ -1820,7 +1820,7 @@
     GetWindowBounds(whichWindow, kWindowContentRgn, &r);
     gui_resize_shell(r.right - r.left, r.bottom - r.top);
     gui_mch_set_bg_color(gui.back_pixel);
-    gui_set_shellsize(TRUE, FALSE);
+    gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
 }
 
 /*
@@ -3202,7 +3202,8 @@
     int		min_width,
     int		min_height,
     int		base_width,
-    int		base_height)
+    int		base_height,
+    int		direction)
 {
     CGrafPtr	VimPort;
     Rect	VimBound;
diff --git a/src/gui_photon.c b/src/gui_photon.c
index fa7dc92..f702c41 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -392,7 +392,7 @@
 	    height -= (pg_margin_top + pg_margin_bottom);
 #endif
 	    gui_resize_shell( *width, *height );
-	    gui_set_shellsize( FALSE, FALSE );
+	    gui_set_shellsize( FALSE, FALSE, RESIZE_BOTH );
 	    is_ignore_draw = FALSE;
 	    PtEndFlux( gui.vimContainer );
 	    PtContainerRelease( gui.vimContainer );
@@ -825,7 +825,7 @@
 	void *data,
 	PtCallbackInfo_t *info )
 {
-    gui_set_shellsize( FALSE, TRUE );
+    gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH );
     return( Pt_CONTINUE );
 }
 
@@ -1660,7 +1660,8 @@
 
     void
 gui_mch_set_shellsize(int width, int height,
-	int min_width, int min_height, int base_width, int base_height)
+	int min_width, int min_height, int base_width, int base_height,
+	int direction)
 {
     PhDim_t window_size = { width, height };
     PhDim_t min_size = { min_width, min_height };
diff --git a/src/gui_w32.c b/src/gui_w32.c
index b25f50d..7a01d98 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -456,7 +456,7 @@
     if (fix_window && menu_height != old_menu_height)
     {
 	old_menu_height = menu_height;
-	gui_set_shellsize(FALSE, FALSE);
+	gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
     }
 
     return menu_height;
@@ -706,6 +706,29 @@
 	HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGED, _OnWindowPosChanged);
 #endif
 
+#ifdef FEAT_GUI_TABLINE
+	case WM_RBUTTONUP:
+	{
+	    if (gui_mch_showing_tabline())
+	    {
+		POINT pt;
+		RECT rect;
+
+		/*
+		 * If the cursor is on the tabline, display the tab menu
+		 */
+		GetCursorPos((LPPOINT)&pt);
+		GetWindowRect(s_textArea, &rect);
+		if (pt.y < rect.top)
+		{
+		    show_tabline_popup_menu();
+		    return 0;
+		}
+	    }
+	    return MyWindowProc(hwnd, uMsg, wParam, lParam);
+	}
+#endif
+
     case WM_QUERYENDSESSION:	/* System wants to go down. */
 	gui_shell_closed();	/* Will exit when no changed buffers. */
 	return FALSE;		/* Do NOT allow system to go down. */
@@ -797,6 +820,12 @@
 				  && ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
 		    send_tabline_event(TabCtrl_GetCurSel(s_tabhwnd) + 1);
 		break;
+
+	    case NM_RCLICK:
+		if (gui_mch_showing_tabline()
+			&& ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
+		    show_tabline_popup_menu();
+		break;
 # endif
 	    default:
 # ifdef FEAT_GUI_TABLINE
@@ -1375,7 +1404,8 @@
 /*ARGSUSED*/
     void
 gui_mch_set_shellsize(int width, int height,
-	int min_width, int min_height, int base_width, int base_height)
+	int min_width, int min_height, int base_width, int base_height,
+	int direction)
 {
     RECT	workarea_rect;
     int		win_width, win_height;
@@ -1413,16 +1443,17 @@
 			;
 
     /* if the window is going off the screen, move it on to the screen */
-    if (win_xpos + win_width > workarea_rect.right)
+    if ((direction & RESIZE_HOR) && win_xpos + win_width > workarea_rect.right)
 	win_xpos = workarea_rect.right - win_width;
 
-    if (win_xpos < workarea_rect.left)
+    if ((direction & RESIZE_HOR) && win_xpos < workarea_rect.left)
 	win_xpos = workarea_rect.left;
 
-    if (win_ypos + win_height > workarea_rect.bottom)
+    if ((direction & RESIZE_VERT)
+			      && win_ypos + win_height > workarea_rect.bottom)
 	win_ypos = workarea_rect.bottom - win_height;
 
-    if (win_ypos < workarea_rect.top)
+    if ((direction & RESIZE_VERT) && win_ypos < workarea_rect.top)
 	win_ypos = workarea_rect.top;
 
     /* When the taskbar is placed on the left or top of the screen,
diff --git a/src/version.h b/src/version.h
index ce5ff07..3b06de9 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
  */
 #define VIM_VERSION_NODOT	"vim70c"
 #define VIM_VERSION_SHORT	"7.0c"
-#define VIM_VERSION_MEDIUM	"7.0c BETA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0c BETA (2006 Mar 27)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0c BETA (2006 Mar 27, compiled "
+#define VIM_VERSION_MEDIUM	"7.0c01 BETA"
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0c01 BETA (2006 Mar 27)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0c01 BETA (2006 Mar 27, compiled "
