Commit 4c44499b authored by Matthias Clasen's avatar Matthias Clasen

gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix

some off-by-one issues, fixing selection of line-ends. (#50323)
parent f9cc4426
2001-08-07 <matthiasc@waldgeist.poet.de>
* gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix
some off-by-one issues, fixing selection of line-ends. (#50323)
2001-08-07 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtkhsv.c (gtk_hsv_map, gtk_hsv_unmap): Reinstate these
......
2001-08-07 <matthiasc@waldgeist.poet.de>
* gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix
some off-by-one issues, fixing selection of line-ends. (#50323)
2001-08-07 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtkhsv.c (gtk_hsv_map, gtk_hsv_unmap): Reinstate these
......
2001-08-07 <matthiasc@waldgeist.poet.de>
* gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix
some off-by-one issues, fixing selection of line-ends. (#50323)
2001-08-07 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtkhsv.c (gtk_hsv_map, gtk_hsv_unmap): Reinstate these
......
2001-08-07 <matthiasc@waldgeist.poet.de>
* gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix
some off-by-one issues, fixing selection of line-ends. (#50323)
2001-08-07 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtkhsv.c (gtk_hsv_map, gtk_hsv_unmap): Reinstate these
......
2001-08-07 <matthiasc@waldgeist.poet.de>
* gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix
some off-by-one issues, fixing selection of line-ends. (#50323)
2001-08-07 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtkhsv.c (gtk_hsv_map, gtk_hsv_unmap): Reinstate these
......
2001-08-07 <matthiasc@waldgeist.poet.de>
* gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix
some off-by-one issues, fixing selection of line-ends. (#50323)
2001-08-07 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtkhsv.c (gtk_hsv_map, gtk_hsv_unmap): Reinstate these
......
2001-08-07 <matthiasc@waldgeist.poet.de>
* gtk/gtktextdisplay.c (render_para, gtk_text_layout_draw): Fix
some off-by-one issues, fixing selection of line-ends. (#50323)
2001-08-07 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtkhsv.c (gtk_hsv_map, gtk_hsv_unmap): Reinstate these
......
......@@ -539,7 +539,7 @@ render_para (GdkDrawable *drawable,
y + PANGO_PIXELS (baseline),
FALSE);
if (selection_start_index < byte_offset + line->length &&
if (selection_start_index <= byte_offset + line->length &&
selection_end_index > byte_offset) /* Some selected */
{
GdkRegion *clip_region = get_selected_clip (render_state, layout, line,
......@@ -746,7 +746,7 @@ gtk_text_layout_draw (GtkTextLayout *layout,
{
GtkTextIter line_start, line_end;
gint byte_count;
gtk_text_layout_get_iter_at_line (layout,
&line_start,
line, 0);
......@@ -757,8 +757,8 @@ gtk_text_layout_draw (GtkTextLayout *layout,
&line_end,
line, byte_count - 1);
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_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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment