projects
/
profile
/
ivi
/
clutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8174f66
)
[text] Maintain the cursor at the end when deleting
author
Emmanuele Bassi
<ebassi@linux.intel.com>
Thu, 14 May 2009 11:00:51 +0000
(12:00 +0100)
committer
Emmanuele Bassi
<ebassi@linux.intel.com>
Thu, 14 May 2009 11:00:51 +0000
(12:00 +0100)
If the cursor is already at the end of the Text contents then we
need to maintain its position when deleting the previous character
using the relative key binding.
clutter/clutter-text.c
patch
|
blob
|
history
diff --git
a/clutter/clutter-text.c
b/clutter/clutter-text.c
index
b9b5428
..
5b0aa14
100644
(file)
--- a/
clutter/clutter-text.c
+++ b/
clutter/clutter-text.c
@@
-1765,17
+1765,17
@@
clutter_text_real_del_prev (ClutterText *self,
{
if (pos == -1)
{
- clutter_text_set_cursor_position (self, len - 1);
- clutter_text_set_selection_bound (self, len - 1);
-
clutter_text_delete_text (self, len - 1, len);
+
+ clutter_text_set_cursor_position (self, -1);
+ clutter_text_set_selection_bound (self, -1);
}
else
{
+ clutter_text_delete_text (self, pos - 1, pos);
+
clutter_text_set_cursor_position (self, pos - 1);
clutter_text_set_selection_bound (self, pos - 1);
-
- clutter_text_delete_text (self, pos - 1, pos);
}
}