diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-08-21 00:13:38 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-08-21 00:13:38 +0000 |
commit | 29d8fe021bff60e4cdfbe977fd7dc462a5d3a711 (patch) | |
tree | 3b8a03dab531c0e9d18a2997febd74073741958d | |
parent | f616dc9a9af64a43d9299c2d2e2a5bb2f9fac6fd (diff) | |
download | gtk+-29d8fe021bff60e4cdfbe977fd7dc462a5d3a711.tar.gz |
Check to see if we've computed our geometry yet, and if not, ignore the
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
gtk/gtktext.c (correct_cache_insert): Fiddled around]
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gtk/gtktext.c | 34 |
8 files changed, 79 insertions, 18 deletions
@@ -1,3 +1,12 @@ +Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktext.c ([un]draw_cursor): Check to see if we've + computed our geometry yet, and if not, ignore the request. + + gtk/gtktext.c (correct_cache_insert): Fiddled around] + some more. All the bug-test codes seem to work at once + now. (fingers crossed...) + Thu Aug 20 13:04:08 PDT 1998 Manish Singh <yosh@gimp.org> * gdk/gdkrgb.c: silly visual fixes diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index c406187729..c1eb6e6bc5 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktext.c ([un]draw_cursor): Check to see if we've + computed our geometry yet, and if not, ignore the request. + + gtk/gtktext.c (correct_cache_insert): Fiddled around] + some more. All the bug-test codes seem to work at once + now. (fingers crossed...) + Thu Aug 20 13:04:08 PDT 1998 Manish Singh <yosh@gimp.org> * gdk/gdkrgb.c: silly visual fixes diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c406187729..c1eb6e6bc5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktext.c ([un]draw_cursor): Check to see if we've + computed our geometry yet, and if not, ignore the request. + + gtk/gtktext.c (correct_cache_insert): Fiddled around] + some more. All the bug-test codes seem to work at once + now. (fingers crossed...) + Thu Aug 20 13:04:08 PDT 1998 Manish Singh <yosh@gimp.org> * gdk/gdkrgb.c: silly visual fixes diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index c406187729..c1eb6e6bc5 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktext.c ([un]draw_cursor): Check to see if we've + computed our geometry yet, and if not, ignore the request. + + gtk/gtktext.c (correct_cache_insert): Fiddled around] + some more. All the bug-test codes seem to work at once + now. (fingers crossed...) + Thu Aug 20 13:04:08 PDT 1998 Manish Singh <yosh@gimp.org> * gdk/gdkrgb.c: silly visual fixes diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c406187729..c1eb6e6bc5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktext.c ([un]draw_cursor): Check to see if we've + computed our geometry yet, and if not, ignore the request. + + gtk/gtktext.c (correct_cache_insert): Fiddled around] + some more. All the bug-test codes seem to work at once + now. (fingers crossed...) + Thu Aug 20 13:04:08 PDT 1998 Manish Singh <yosh@gimp.org> * gdk/gdkrgb.c: silly visual fixes diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c406187729..c1eb6e6bc5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktext.c ([un]draw_cursor): Check to see if we've + computed our geometry yet, and if not, ignore the request. + + gtk/gtktext.c (correct_cache_insert): Fiddled around] + some more. All the bug-test codes seem to work at once + now. (fingers crossed...) + Thu Aug 20 13:04:08 PDT 1998 Manish Singh <yosh@gimp.org> * gdk/gdkrgb.c: silly visual fixes diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c406187729..c1eb6e6bc5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com> + + * gtk/gtktext.c ([un]draw_cursor): Check to see if we've + computed our geometry yet, and if not, ignore the request. + + gtk/gtktext.c (correct_cache_insert): Fiddled around] + some more. All the bug-test codes seem to work at once + now. (fingers crossed...) + Thu Aug 20 13:04:08 PDT 1998 Manish Singh <yosh@gimp.org> * gdk/gdkrgb.c: silly visual fixes diff --git a/gtk/gtktext.c b/gtk/gtktext.c index e963e203f2..2cfed81c59 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -1154,7 +1154,7 @@ gtk_text_realize (GtkWidget *widget) #endif init_properties (text); - + gdk_window_show (text->text_area); if (editable->selection_start_pos != editable->selection_end_pos) @@ -2484,23 +2484,21 @@ correct_cache_insert (GtkText* text, gint nchars) /* If we inserted a property exactly at the beginning of the * line, we have to correct here, or fetch_lines will * fetch junk. - * - * This also handles the case when we split exactly - * at the beginning and start->offset is now invalid */ - start = &CACHE_DATA(text->current_line).start; - if (was_split) - { - /* If we split exactly at the beginning... */ - if (start->offset == MARK_CURRENT_PROPERTY (start)->length) - SET_PROPERTY_MARK (start, start->property->next, 0); - /* If we inserted a property at the beginning of the text... */ - else if ((start->property == text->point.property) && - (start->index == text->point.index - nchars)) - SET_PROPERTY_MARK (start, start->property->prev, 0); - } - + + /* Check if if we split exactly at the beginning of the line: + * (was_split won't be set if we are inserting at the end of the text, + * so we don't check) + */ + if (start->offset == MARK_CURRENT_PROPERTY (start)->length) + SET_PROPERTY_MARK (start, start->property->next, 0); + /* Check if we inserted a property at the beginning of the text: */ + else if (was_split && + (start->property == text->point.property) && + (start->index == text->point.index - nchars)) + SET_PROPERTY_MARK (start, start->property->prev, 0); + /* Now correct the offsets, and check for start or end marks that * are after the point, yet point to a property before the point's * property. This indicates that they are meant to point to the @@ -4621,7 +4619,7 @@ undraw_cursor (GtkText* text, gint absolute) if ((text->cursor_drawn_level ++ == 0) && (editable->selection_start_pos == editable->selection_end_pos) && - GTK_WIDGET_DRAWABLE (text)) + GTK_WIDGET_DRAWABLE (text) && text->line_start_cache) { GdkFont* font; @@ -4702,7 +4700,7 @@ draw_cursor (GtkText* text, gint absolute) if ((--text->cursor_drawn_level == 0) && editable->editable && (editable->selection_start_pos == editable->selection_end_pos) && - GTK_WIDGET_DRAWABLE (text)) + GTK_WIDGET_DRAWABLE (text) && text->line_start_cache) { GdkFont* font; |