projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e386dd2
)
editor: Fix selection anchor on text deletion
author
Jan Arne Petersen
<jpetersen@openismus.com>
Mon, 17 Sep 2012 13:28:10 +0000
(15:28 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 25 Sep 2012 15:24:49 +0000
(11:24 -0400)
When text is deleted adjust selection anchor.
clients/editor.c
patch
|
blob
|
history
diff --git
a/clients/editor.c
b/clients/editor.c
index
5c75ac1
..
af1623f
100644
(file)
--- a/
clients/editor.c
+++ b/
clients/editor.c
@@
-591,6
+591,8
@@
text_entry_delete_text(struct text_entry *entry,
if (entry->cursor > index)
entry->cursor -= length;
+ entry->anchor = entry->cursor;
+
entry->text[index] = '\0';
strcat(entry->text, entry->text + index + length);