Outstanding patches, #50323



Today I went over the open gtk bugs in bugzilla and marked all
patch-carrying ones
with the PATCH keyword. There are 59 outstanding patches now.
Rather than adding more, I'd like to help with cleaning up the backlog a
bit.

As as starter, is it ok to commit the following fix for #50323,
GtkTextView misdraws selection for newlines ?

Matthias

Index: gtk/gtktextdisplay.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextdisplay.c,v
retrieving revision 1.26
diff -u -3 -p -u -r1.26 gtktextdisplay.c
--- gtk/gtktextdisplay.c 2001/07/12 17:50:13 1.26
+++ gtk/gtktextdisplay.c 2001/07/19 08:49:57
@@ -539,7 +539,7 @@ render_para (GdkDrawable        *drawabl
                               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,
@@ -757,8 +757,8 @@ gtk_text_layout_draw (GtkTextLayout *lay
                                                 &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);








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]