If a character is replaced by a character of different width, the caret needs to move. Checking change in character index isn't enough, so move caret if redraw was required too.

This commit is contained in:
Michael Drake 2013-02-09 18:41:23 +00:00
parent 32e9602126
commit 10edbc45bd

View File

@ -2053,8 +2053,9 @@ bool textarea_keypress(struct textarea *ta, uint32_t key)
} }
if (caret != caret_init) if (caret != caret_init || redraw)
textarea_set_caret(ta, caret); textarea_set_caret(ta, caret);
//TODO:redraw only the important part //TODO:redraw only the important part
if (redraw) { if (redraw) {
msg.ta = ta; msg.ta = ta;