diff --git a/ChangeLog b/ChangeLog index 738ef9a76c..0757828c3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-02-20 Matthias Clasen + + * gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag): + Check if line_ancestor_parent is NULL. (#102711, Manuel Clos) + + * gtk/gtktextview.c (gtk_text_view_scroll_to_iter): + (gtk_text_view_update_adjustments): Make sure cursor stays visible + during horizontal scrolling. (#75270) + 2003-02-19 Matthias Clasen * gdk/gdkkeys.c (gdk_keymap_class_init): Associate the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 738ef9a76c..0757828c3f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2003-02-20 Matthias Clasen + + * gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag): + Check if line_ancestor_parent is NULL. (#102711, Manuel Clos) + + * gtk/gtktextview.c (gtk_text_view_scroll_to_iter): + (gtk_text_view_update_adjustments): Make sure cursor stays visible + during horizontal scrolling. (#75270) + 2003-02-19 Matthias Clasen * gdk/gdkkeys.c (gdk_keymap_class_init): Associate the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 738ef9a76c..0757828c3f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2003-02-20 Matthias Clasen + + * gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag): + Check if line_ancestor_parent is NULL. (#102711, Manuel Clos) + + * gtk/gtktextview.c (gtk_text_view_scroll_to_iter): + (gtk_text_view_update_adjustments): Make sure cursor stays visible + during horizontal scrolling. (#75270) + 2003-02-19 Matthias Clasen * gdk/gdkkeys.c (gdk_keymap_class_init): Associate the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 738ef9a76c..0757828c3f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2003-02-20 Matthias Clasen + + * gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag): + Check if line_ancestor_parent is NULL. (#102711, Manuel Clos) + + * gtk/gtktextview.c (gtk_text_view_scroll_to_iter): + (gtk_text_view_update_adjustments): Make sure cursor stays visible + during horizontal scrolling. (#75270) + 2003-02-19 Matthias Clasen * gdk/gdkkeys.c (gdk_keymap_class_init): Associate the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 738ef9a76c..0757828c3f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2003-02-20 Matthias Clasen + + * gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag): + Check if line_ancestor_parent is NULL. (#102711, Manuel Clos) + + * gtk/gtktextview.c (gtk_text_view_scroll_to_iter): + (gtk_text_view_update_adjustments): Make sure cursor stays visible + during horizontal scrolling. (#75270) + 2003-02-19 Matthias Clasen * gdk/gdkkeys.c (gdk_keymap_class_init): Associate the diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 3fa504d2cb..7ce0b4d11f 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -4347,7 +4347,10 @@ _gtk_text_line_previous_could_contain_tag (GtkTextLine *line, line_ancestor = line_ancestor_parent; line_ancestor_parent = line_ancestor->parent; - node = line_ancestor_parent->children.node; + if (line_ancestor_parent != NULL) + { + node = line_ancestor_parent->children.node; + } } /* No dice. */ diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 823aea6919..55fc213514 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -1436,7 +1436,10 @@ gtk_text_view_scroll_to_iter (GtkTextView *text_view, if (screen.height < 1) screen.height = 1; - screen_right = screen.x + screen.width; + /* The -1 here ensures that we leave enough space to draw the cursor + * when this function is used for horizontal scrolling. + */ + screen_right = screen.x + screen.width - 1; screen_bottom = screen.y + screen.height; /* The alignment affects the point in the target character that we @@ -1674,6 +1677,9 @@ gtk_text_view_update_adjustments (GtkTextView *text_view) if (text_view->layout) gtk_text_layout_get_size (text_view->layout, &width, &height); + /* Make room for the cursor after the last character in the widest line */ + width++; + if (text_view->width != width || text_view->height != height) { text_view->width = width;