From fa0352a0e8aefb4a78ccc4d22782065a15882e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nic=20Soud=C3=A9e?= Date: Fri, 21 Jan 2022 15:18:03 -0500 Subject: [PATCH] enter text button at tail when using keystroke --- src/readline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/readline.c b/src/readline.c index 09d2533b..434f2850 100644 --- a/src/readline.c +++ b/src/readline.c @@ -380,7 +380,10 @@ byte Readline_ex_unicode(word x_pos, word y_pos, char * str, word * str_unicode, else { int int_pos = ((Mouse_X-Window_pos_X)/Menu_factor_X - x_pos) >> 3; - position = (int_pos >= 0 && int_pos <= 255) ? (byte)int_pos : 255; + if (Mouse_K==LEFT_SIDE) + position = (int_pos >= 0 && int_pos <= 255) ? (byte)int_pos : 255; + else + position = 255; // always edit from the tail if using hotkey if (input_type==INPUT_TYPE_INTEGER && str[0]!='\0') snprintf(str,10,"%d",atoi(str)); // align left