fix assertion failure by creating the line data, but not validating it at

2002-01-25  Havoc Pennington  <hp@redhat.com>

        * gtk/gtktextbtree.c (_gtk_text_btree_delete): fix assertion
        failure by creating the line data, but not validating it at this
        stage. Also, remove old code related to the "bogus newline" mess
        that removed all tags from the last char in the buffer if you
        tried to delete it.
        (_gtk_text_line_data_new): put this here and prepend underscore,
        remove from gtktextlayout.c
This commit is contained in:
Havoc Pennington
2002-01-29 04:55:48 +00:00
committed by Havoc Pennington
parent c5c5ff650d
commit 5d82c0a4b6
10 changed files with 108 additions and 91 deletions

View File

@ -86,9 +86,6 @@
#include <stdlib.h>
#include <string.h>
static GtkTextLineData *gtk_text_line_data_new (GtkTextLayout *layout,
GtkTextLine *line);
static GtkTextLineData *gtk_text_layout_real_wrap (GtkTextLayout *layout,
GtkTextLine *line,
/* may be NULL */
@ -925,7 +922,7 @@ gtk_text_layout_real_wrap (GtkTextLayout *layout,
if (line_data == NULL)
{
line_data = gtk_text_line_data_new (layout, line);
line_data = _gtk_text_line_data_new (layout, line);
_gtk_text_line_add_data (line, line_data);
}
@ -2036,24 +2033,6 @@ line_display_index_to_iter (GtkTextLayout *layout,
gtk_text_iter_forward_chars (iter, trailing);
}
/* FIXME: This really doesn't belong in this file ... */
static GtkTextLineData*
gtk_text_line_data_new (GtkTextLayout *layout,
GtkTextLine *line)
{
GtkTextLineData *line_data;
line_data = g_new (GtkTextLineData, 1);
line_data->view_id = layout;
line_data->next = NULL;
line_data->width = 0;
line_data->height = 0;
line_data->valid = FALSE;
return line_data;
}
static void
get_line_at_y (GtkTextLayout *layout,
gint y,