Fix for #63426 - GtkTextView core dumps on deletion



Ok to commit ?

	* gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end) :
	Made function to work as documented, fixes #63426

--- from-cvs/gtk+/gtk/gtktextiter.c	Sat Oct 27 02:18:26 2001
+++ my-gtk/gtk+/gtk/gtktextiter.c	Sun Nov 04 17:34:24 2001
@@ -3802,8 +3802,14 @@
 
   current_offset = gtk_text_iter_get_line_offset (iter);
   new_offset = find_paragraph_delimiter_for_line (iter);
-  
-  if (current_offset < new_offset)
+
+  if (0 == new_offset) 
+    {
+      while (!gtk_text_iter_ends_line (iter))
+        gtk_text_iter_forward_char (iter);
+      return FALSE;
+    }
+  else if (current_offset < new_offset)
     {
       /* Move to end of this line. */
       gtk_text_iter_set_line_offset (iter, new_offset);

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]