commit | 80ad1a943d6433ec598386aaa9b9bfcced590f90 | [log] [tgz] |
---|---|---|
author | Jan Arne Petersen <jpetersen@openismus.com> | Mon Sep 17 15:28:10 2012 +0200 |
committer | Kristian Høgsberg <krh@bitplanet.net> | Tue Sep 25 11:24:49 2012 -0400 |
tree | dc658880ffcc2cf2cfadb96743ef418e927b2562 | |
parent | e386dd22c4aab327b38881e6169f24fb02b9a6e6 [diff] [blame] |
editor: Fix selection anchor on text deletion When text is deleted adjust selection anchor.
diff --git a/clients/editor.c b/clients/editor.c index 5c75ac1..af1623f 100644 --- a/clients/editor.c +++ b/clients/editor.c
@@ -591,6 +591,8 @@ if (entry->cursor > index) entry->cursor -= length; + entry->anchor = entry->cursor; + entry->text[index] = '\0'; strcat(entry->text, entry->text + index + length);