Fix the selection behaviour around the 0th glyph

After fixing the cursor position issues around the initial
glyph of the layout, the selection position needs fixing as
well.

The fix is similar: check if the position of the selection
is 0 and provide a fast path by setting the offset to 0.
This commit is contained in:
Emmanuele Bassi 2008-12-16 15:53:57 +00:00
parent ba586b46b3
commit 6b782ce4e7

View File

@ -811,7 +811,14 @@ cursor_paint (ClutterText *self)
gint end_index;
gint line_no;
if (priv->position == 0)
start_index = 0;
else
start_index = offset_to_bytes (utf8, priv->position);
if (priv->selection_bound == 0)
end_index = 0;
else
end_index = offset_to_bytes (utf8, priv->selection_bound);
if (start_index > end_index)