changeset 7734:e11cef6aabba

[gaim-migrate @ 8379] This is good. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 04 Dec 2003 04:22:44 +0000
parents 8b6c08c50b26
children edebf99a5ec4
files src/gtkimhtml.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Thu Dec 04 04:10:52 2003 +0000
+++ b/src/gtkimhtml.c	Thu Dec 04 04:22:44 2003 +0000
@@ -1964,7 +1964,14 @@
 static void insert_cb(GtkTextBuffer *buffer, GtkTextIter *iter, gchar *text, gint len, GtkIMHtml *imhtml)
 {
 	GtkIMHtmlFormatSpan *span = NULL;
+	GtkTextIter end;
+
 	gtk_text_iter_forward_chars(iter, len);
+	gtk_text_buffer_get_end_iter(imhtml->text_buffer, &end);
+	gtk_text_iter_forward_char(&end);
+	
+	if (!gtk_text_iter_equal(&end, iter))
+		return;
 
 	if (!imhtml->editable)
 		return;
@@ -1972,7 +1979,6 @@
 	if ((span = imhtml->edit.bold)) {
 		GtkTextIter bold;
 		gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &bold, span->start);
-		gtk_text_iter_forward_chars(iter, len);
 		gtk_text_buffer_apply_tag_by_name(imhtml->text_buffer, "BOLD", &bold, iter);
 	}