Check if line_ancestor_parent is NULL. (#102711, Manuel Clos)

2003-02-20  Matthias Clasen  <maclas@gmx.de>

	* 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)
This commit is contained in:
Matthias Clasen 2003-02-20 19:42:05 +00:00 committed by Matthias Clasen
parent db0dfee6de
commit 452de5d6a4
7 changed files with 56 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2003-02-20 Matthias Clasen <maclas@gmx.de>
* 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 <maclas@gmx.de> 2003-02-19 Matthias Clasen <maclas@gmx.de>
* tests/testdnd.c: Replace gtk_timeout_* by their GLib * tests/testdnd.c: Replace gtk_timeout_* by their GLib

View File

@ -1,3 +1,12 @@
2003-02-20 Matthias Clasen <maclas@gmx.de>
* 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 <maclas@gmx.de> 2003-02-19 Matthias Clasen <maclas@gmx.de>
* tests/testdnd.c: Replace gtk_timeout_* by their GLib * tests/testdnd.c: Replace gtk_timeout_* by their GLib

View File

@ -1,3 +1,12 @@
2003-02-20 Matthias Clasen <maclas@gmx.de>
* 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 <maclas@gmx.de> 2003-02-19 Matthias Clasen <maclas@gmx.de>
* tests/testdnd.c: Replace gtk_timeout_* by their GLib * tests/testdnd.c: Replace gtk_timeout_* by their GLib

View File

@ -1,3 +1,12 @@
2003-02-20 Matthias Clasen <maclas@gmx.de>
* 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 <maclas@gmx.de> 2003-02-19 Matthias Clasen <maclas@gmx.de>
* tests/testdnd.c: Replace gtk_timeout_* by their GLib * tests/testdnd.c: Replace gtk_timeout_* by their GLib

View File

@ -1,3 +1,12 @@
2003-02-20 Matthias Clasen <maclas@gmx.de>
* 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 <maclas@gmx.de> 2003-02-19 Matthias Clasen <maclas@gmx.de>
* tests/testdnd.c: Replace gtk_timeout_* by their GLib * tests/testdnd.c: Replace gtk_timeout_* by their GLib

View File

@ -4356,7 +4356,10 @@ _gtk_text_line_previous_could_contain_tag (GtkTextLine *line,
line_ancestor = line_ancestor_parent; line_ancestor = line_ancestor_parent;
line_ancestor_parent = 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. */ /* No dice. */

View File

@ -1426,7 +1426,10 @@ gtk_text_view_scroll_to_iter (GtkTextView *text_view,
if (screen.height < 1) if (screen.height < 1)
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; screen_bottom = screen.y + screen.height;
/* The alignment affects the point in the target character that we /* The alignment affects the point in the target character that we
@ -1664,6 +1667,9 @@ gtk_text_view_update_adjustments (GtkTextView *text_view)
if (text_view->layout) if (text_view->layout)
gtk_text_layout_get_size (text_view->layout, &width, &height); 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) if (text_view->width != width || text_view->height != height)
{ {
text_view->width = width; text_view->width = width;