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:
parent
ba586b46b3
commit
6b782ce4e7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user