diff -u -r1.94 terminal.c
--- terminal.c	20 Jan 2006 18:05:44 -0000	1.94
+++ terminal.c	18 Feb 2006 10:13:18 -0000
@@ -3721,6 +3721,12 @@
 static void
 handle_new_terminal_events (void)
 {
+  static gboolean currently_handling_events = FALSE;
+
+	if (currently_handling_events)
+		return;
+  currently_handling_events = TRUE;
+
   while (pending_new_terminal_events != NULL)
     {
       GSList *next = pending_new_terminal_events->next;
@@ -3733,6 +3739,7 @@
       g_slist_free_1 (pending_new_terminal_events);
       pending_new_terminal_events = next;
     }
+  currently_handling_events = FALSE;
 }
 
 /*
