Index: vteaccess.c
===================================================================
RCS file: /cvs/gnome/vte/src/vteaccess.c,v
retrieving revision 1.50
diff -u -r1.50 vteaccess.c
--- vteaccess.c	18 Apr 2006 22:50:29 -0000	1.50
+++ vteaccess.c	1 Nov 2006 05:38:17 -0000
@@ -449,6 +449,7 @@
 	VteTerminalAccessiblePrivate *priv;
 	char *old, *current;
 	glong offset, olen, clen;
+	gint old_snapshot_caret;
 
 	g_assert(VTE_IS_TERMINAL_ACCESSIBLE(data));
 
@@ -456,6 +457,7 @@
 				 VTE_TERMINAL_ACCESSIBLE_PRIVATE_DATA);
 	g_assert(priv != NULL);
 
+	old_snapshot_caret = priv->snapshot_caret;
 	priv->snapshot_contents_invalid = TRUE;
 	vte_terminal_accessible_update_private_data_if_needed(ATK_OBJECT(data),
 							      &old, &olen);
@@ -473,6 +475,23 @@
 		offset++;
 	}
 
+        /* Check if we just backspaced over a space. */
+	if ((olen == offset) && (old[priv->snapshot_caret] == ' ') &&
+	    (old_snapshot_caret == (priv->snapshot_caret + 1))) {
+		glong bsp_olen = priv->snapshot_caret+1;
+                glong bsp_offset = priv->snapshot_caret;
+
+                priv->snapshot_text->str = old;
+		priv->snapshot_text->len = bsp_olen;
+		emit_text_changed_delete(G_OBJECT(data),
+					 old,
+					 bsp_offset,
+					 bsp_olen - bsp_offset);
+		priv->snapshot_text->str = current;
+		priv->snapshot_text->len = clen;
+	}
+
+
 	/* At least one of them had better have more data, right? */
 	if ((offset < olen) || (offset < clen)) {
 		/* Back up from both end points until we find the *last* point
@@ -491,10 +510,14 @@
 		/* Now emit a deleted signal for text that was in the old
 		 * string but isn't in the new one... */
 		if (olen > offset) {
+			priv->snapshot_text->str = old;
+			priv->snapshot_text->len = olen;
 			emit_text_changed_delete(G_OBJECT(data),
 						 old,
 						 offset,
 						 olen - offset);
+			priv->snapshot_text->str = current;
+			priv->snapshot_text->len = clen;
 		}
 		/* .. and an inserted signal for text that wasn't in the old
 		 * string but is in the new one. */
