--- vte-0.24.3.orig/src/vteseq.c	2010-07-12 19:30:28.000000000 +0000
+++ vte-0.24.3/src/vteseq.c	2011-06-09 12:18:34.000000000 +0000
@@ -1574,6 +1574,19 @@
 static void
 vte_sequence_handler_IC (VteTerminal *terminal, GValueArray *params)
 {
+	long limit, val;
+	VteScreen *screen;
+	struct vte_cursor_position cur_pos;
+
+	screen = terminal->pvt->screen;
+	cur_pos = screen->cursor_current;
+	
+	limit = terminal->column_count - cur_pos.col;
+
+        val = g_value_get_long(params->values);
+	if (val > limit)
+		g_value_set_long(params->values, limit);
+
 	vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_ic);
 }
 
