diff src/gtk/view_dialog.c @ 588:2366865be140

2004-10-5 Brian Masney <masneyb@gftp.org> * src/gtk/menu-items.c (dosavelog, viewlog) - make sure the entire log is written out when multibyte characters are used * src/gtk/view_dialog.c - small improvements to the way text is inserted in the gtk+ 2.x port
author masneyb
date Wed, 06 Oct 2004 02:32:41 +0000
parents 739afd9df73c
children fa0838b22b14
line wrap: on
line diff
--- a/src/gtk/view_dialog.c	Wed Oct 06 02:07:58 2004 +0000
+++ b/src/gtk/view_dialog.c	Wed Oct 06 02:32:41 2004 +0000
@@ -255,7 +255,6 @@
 #if GTK_MAJOR_VERSION > 1
   GtkTextBuffer * textbuf;
   GtkTextIter iter;
-  guint len;
 #endif
 
   doclose = 1;
@@ -423,9 +422,8 @@
       gtk_text_insert (GTK_TEXT (view), NULL, NULL, NULL, buf, -1);
 #else
       textbuf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
-      len = gtk_text_buffer_get_char_count (textbuf);
-      gtk_text_buffer_get_iter_at_offset (textbuf, &iter, len);
-      gtk_text_buffer_insert (textbuf, &iter, buf, n);
+      gtk_text_buffer_get_iter_at_offset (textbuf, &iter, -1);
+      gtk_text_buffer_insert (textbuf, &iter, buf, -1);
 #endif
     }