From 339e37663fdd6c928a8cdab35293b00b50846b71 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Thu, 15 Feb 2018 16:42:39 +0100 Subject: [PATCH] readline.c: fix cursor display with unicode characters --- src/readline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/readline.c b/src/readline.c index ab5eefd0..5595650c 100644 --- a/src/readline.c +++ b/src/readline.c @@ -219,12 +219,12 @@ static void Display_whole_string(word x_pos,word y_pos,const char * str,byte pos static void Display_whole_string_unicode(word x_pos,word y_pos, const word * str_unicode,byte position) { - char cursor[2]; + word cursor[2]; Print_general_unicode(x_pos,y_pos,str_unicode,TEXT_COLOR,BACKGROUND_COLOR); cursor[0]=str_unicode[position] ? str_unicode[position] : ' '; - cursor[1]='\0'; - Print_general(x_pos+(position<<3)*Menu_factor_X,y_pos,cursor,CURSOR_COLOR,CURSOR_BACKGROUND_COLOR); + cursor[1]=0; + Print_general_unicode(x_pos+(position<<3)*Menu_factor_X,y_pos,cursor,CURSOR_COLOR,CURSOR_BACKGROUND_COLOR); } void Init_virtual_keyboard(word y_pos, word keyboard_width, word keyboard_height)