forked from AuroraMiddleware/gtk
Make selecting the last character work again
This broke when I added link support. git bisect helped to track it down.
This commit is contained in:
parent
b3b26b517d
commit
088baaec31
@ -3841,6 +3841,7 @@ get_layout_index (GtkLabel *label,
|
||||
gint trailing = 0;
|
||||
const gchar *cluster;
|
||||
const gchar *cluster_end;
|
||||
gboolean inside;
|
||||
|
||||
*index = 0;
|
||||
|
||||
@ -3851,10 +3852,10 @@ get_layout_index (GtkLabel *label,
|
||||
x *= PANGO_SCALE;
|
||||
y *= PANGO_SCALE;
|
||||
|
||||
if (pango_layout_xy_to_index (label->layout,
|
||||
inside = pango_layout_xy_to_index (label->layout,
|
||||
x, y,
|
||||
index, &trailing))
|
||||
{
|
||||
index, &trailing);
|
||||
|
||||
cluster = label->text + *index;
|
||||
cluster_end = cluster;
|
||||
while (trailing)
|
||||
@ -3865,10 +3866,7 @@ get_layout_index (GtkLabel *label,
|
||||
|
||||
*index += (cluster_end - cluster);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return inside;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user