summaryrefslogtreecommitdiff
path: root/gtk/gtktextdisplay.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-01-08 19:00:29 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-01-08 19:00:29 +0000
commit62113a62714d727ad2e12a53a11619c5a82d73b7 (patch)
tree2ba28fdddd8b43f32a71272d3a260696263f45ea /gtk/gtktextdisplay.c
parent57fdc736824d0156ff403cbeb02a24ee0d0c8ef7 (diff)
downloadgtk+-62113a62714d727ad2e12a53a11619c5a82d73b7.tar.gz
Fix display of the selection in the presence of invisible segments.
2003-01-08 Matthias Clasen <maclas@gmx.de> * gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix display of the selection in the presence of invisible segments.
Diffstat (limited to 'gtk/gtktextdisplay.c')
-rw-r--r--gtk/gtktextdisplay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c
index 4be120d80c..f96a40f551 100644
--- a/gtk/gtktextdisplay.c
+++ b/gtk/gtktextdisplay.c
@@ -805,18 +805,18 @@ gtk_text_layout_draw (GtkTextLayout *layout,
line_end = line_start;
if (!gtk_text_iter_ends_line (&line_end))
gtk_text_iter_forward_to_line_end (&line_end);
- byte_count = gtk_text_iter_get_line_index (&line_end);
+ byte_count = gtk_text_iter_get_visible_line_index (&line_end);
if (gtk_text_iter_compare (&selection_start, &line_end) <= 0 &&
gtk_text_iter_compare (&selection_end, &line_start) >= 0)
{
if (gtk_text_iter_compare (&selection_start, &line_start) >= 0)
- selection_start_index = gtk_text_iter_get_line_index (&selection_start);
+ selection_start_index = gtk_text_iter_get_visible_line_index (&selection_start);
else
selection_start_index = -1;
if (gtk_text_iter_compare (&selection_end, &line_end) <= 0)
- selection_end_index = gtk_text_iter_get_line_index (&selection_end);
+ selection_end_index = gtk_text_iter_get_visible_line_index (&selection_end);
else
selection_end_index = MAX(byte_count, 1);
}