diff src/conversation.c @ 523:023c3851db0a

[gaim-migrate @ 533] fixed some html stuff committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 25 Jul 2000 05:09:14 +0000
parents fd6a3294366f
children f03f041c1aa9
line wrap: on
line diff
--- a/src/conversation.c	Tue Jul 25 00:33:51 2000 +0000
+++ b/src/conversation.c	Tue Jul 25 05:09:14 2000 +0000
@@ -724,14 +724,15 @@
 		return;
 	s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
 	pos = GTK_EDITABLE(entry)->current_pos;
-	sprintf(debug_buff,_("Currently at %d\n"),pos);
+	sprintf(debug_buff, _("Currently at %d, "), pos);
 	debug_print(debug_buff);
 	s2= strstr(&s[pos], post);
-	if (s2)
+	if (s2) {
 		pos = s2 - s + strlen(post);
-	else
-		pos=strlen(s);
-	sprintf(debug_buff,_("Setting position to %d\n"),pos);
+	} else {
+		gtk_editable_insert_text(GTK_EDITABLE(entry), post, strlen(post), &pos);
+	}
+	sprintf(debug_buff, _("Setting position to %d\n"), pos);
 	debug_print(debug_buff);
 	gtk_editable_set_position(GTK_EDITABLE(entry), pos);
 	gtk_widget_grab_focus(entry);