--- gnome-terminal--tab-fixes--0.0.2/src/terminal-window.c.orig	2006-02-09 10:04:02.000000000 +1100
+++ gnome-terminal--tab-fixes--0.0.2/src/terminal-window.c	2006-02-20 23:22:12.000000000 +1100
@@ -1431,14 +1431,44 @@ void
 terminal_window_remove_screen (TerminalWindow *window,
                                TerminalScreen *screen)
 {
+  int old_grid_width;
+  int old_grid_height;
+  
   g_return_if_fail (terminal_screen_get_window (screen) == window);
 
+  old_grid_width = -1;
+  old_grid_height = -1;
+  
+  if (window->priv->active_term == screen)
+    {
+      GtkWidget *old_active_widget;
+      
+      old_active_widget = terminal_screen_get_widget (screen);
+      terminal_widget_get_size (old_active_widget, &old_grid_width, &old_grid_height);
+    }
+
   window->priv->terms = g_list_remove (window->priv->terms, screen);
   
   terminal_screen_set_window (screen, NULL);
   
   terminal_notebook_remove_tab (TERMINAL_NOTEBOOK (window->priv->notebook),
                                 screen);
+
+  if (window->priv->terms && window->priv->active_term)
+    {
+#ifdef DEBUG_GEOMETRY
+      g_print ("setting size with forced grid after removing a terminal\n");
+#endif
+      terminal_window_set_size_force_grid (window, window->priv->active_term,
+                                           TRUE, old_grid_width, old_grid_height);
+    }
+  
+  /* Close window if no more terminals */ 
+  if (window->priv->terms == NULL)
+    {
+      gtk_widget_destroy (GTK_WIDGET (window));
+    }    
+
 }
 
 GList*
@@ -1811,10 +1847,21 @@ notebook_tab_removed_callback (GtkWidget
                                TerminalScreen  *screen,
                                TerminalWindow  *window)
 {  
+  int old_grid_width;
+  int old_grid_height;
+  
+  old_grid_width = -1;
+  old_grid_height = -1;
+  
   /* Called from terminal_notebook_move_tab() */
   if (find_screen (window, screen) != NULL) {
     g_assert (terminal_screen_get_window (screen) == window);
   
+    GtkWidget *old_active_widget;
+    
+    old_active_widget = terminal_screen_get_widget (screen);
+    terminal_widget_get_size (old_active_widget, &old_grid_width, &old_grid_height);
+    
     window->priv->terms = g_list_remove (window->priv->terms, screen);
     terminal_screen_set_window (screen, NULL);
   }
@@ -1842,9 +1889,14 @@ notebook_tab_removed_callback (GtkWidget
   reset_tab_menuitems (window);
   update_tab_sensitivity (window);
 
-  /* Close window if no more terminals */
-  if (window->priv->terms == NULL)
-    gtk_widget_destroy (GTK_WIDGET (window));
+  if ((old_grid_width > -1) && (old_grid_height > -1))
+    {
+#ifdef DEBUG_GEOMETRY
+      g_print ("setting size with forced grid after removing a terminal\n");
+#endif
+      terminal_window_set_size_force_grid (window, window->priv->active_term,
+                                           TRUE, old_grid_width, old_grid_height);
+    }
 }
 
 static void
--- gnome-terminal-2.13.90/ChangeLog-	2006-02-20 23:44:43.000000000 +1100
+++ gnome-terminal-2.13.90/ChangeLog	2006-02-20 23:44:52.000000000 +1100
@@ -1,3 +1,8 @@
+2006-02-20  Tony Tsui  <tsuil.tony@gmail.com>
+
+	* src/terminal-window.c: Resize the terminal window after a tab is
+	  removed. Closes bug #324426.
+
 2006-01-30  Guilherme de S. Pastore  <gpastore@gnome.org>
 
 	* NEWS: updated.
