editor: Fix selection anchor on text deletion

When text is deleted adjust selection anchor.
dev
Jan Arne Petersen 12 years ago committed by Kristian Høgsberg
parent e386dd22c4
commit 80ad1a943d
  1. 2
      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);

Loading…
Cancel
Save