From 3a2958ab8268b3388c780f902e74ad0c0d24c5c9 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 5 Aug 2020 02:06:49 +0200 Subject: unicode seek fix --- code/fe310/eos/eve/widget/strw.c | 2 +- code/fe310/eos/eve/widget/textw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'code/fe310') diff --git a/code/fe310/eos/eve/widget/strw.c b/code/fe310/eos/eve/widget/strw.c index 5f7e63d..2a80a28 100644 --- a/code/fe310/eos/eve/widget/strw.c +++ b/code/fe310/eos/eve/widget/strw.c @@ -293,7 +293,7 @@ void eve_strw_putc(void *_page, int c) { switch (c) { case CH_BS: if (cursor1->ch > 0) { - del_c = utf8_seek(str, -1, &uc); + del_c = -utf8_seek(str, -1, &uc); del_w = eve_font_ch_w(widget->font, uc); memmove(str - del_c, str, widget->str_len - cursor1->ch + 1); widget->str_len -= del_c; diff --git a/code/fe310/eos/eve/widget/textw.c b/code/fe310/eos/eve/widget/textw.c index 03f6c0a..bf075cf 100644 --- a/code/fe310/eos/eve/widget/textw.c +++ b/code/fe310/eos/eve/widget/textw.c @@ -309,7 +309,7 @@ void eve_textw_putc(void *_page, int c) { switch (c) { case CH_BS: if (cursor1->ch > 0) { - del_c = utf8_seek(text, -1, &uc); + del_c = -utf8_seek(text, -1, &uc); ch_w = eve_font_ch_w(widget->font, uc); memmove(text - del_c, text, widget->text_len - cursor1->ch + 1); cursor1->ch -= del_c; -- cgit v1.2.3