input: count a manually entered unicode as one character
This fixes https://savannah.gnu.org/bugs/?50403. Reported-by: David Lawrence Ramsey <pooka109@gmail.com>master
parent
29681e0e9f
commit
91910b2364
|
@ -1486,6 +1486,8 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
|
|||
}
|
||||
#endif
|
||||
|
||||
*count = 1;
|
||||
|
||||
#ifdef ENABLE_UTF8
|
||||
if (using_utf8()) {
|
||||
/* Check whether the first code is a valid starter digit: 0 or 1. */
|
||||
|
@ -1518,6 +1520,8 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
|
|||
/* Insert the multibyte sequence into the input buffer. */
|
||||
unget_input(seq, uni_mb_len);
|
||||
|
||||
*count = uni_mb_len;
|
||||
|
||||
free(seq);
|
||||
free(uni_mb);
|
||||
}
|
||||
|
@ -1528,8 +1532,6 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
|
|||
|
||||
free(kbinput);
|
||||
|
||||
*count = 1;
|
||||
|
||||
/* If this is an iTerm/Eterm/rxvt double escape, take both Escapes. */
|
||||
if (key_buffer_len > 3 && *key_buffer == ESC_CODE &&
|
||||
key_buffer[1] == ESC_CODE && key_buffer[2] == '[')
|
||||
|
|
Loading…
Reference in New Issue