Added back code to output single char rather than whole string
This commit is contained in:
@@ -195,14 +195,13 @@ inp_get_char(char *input, int *size)
|
|||||||
|
|
||||||
// otherwise just append
|
// otherwise just append
|
||||||
} else {
|
} else {
|
||||||
char bytes[MB_CUR_MAX];
|
char bytes[MB_CUR_MAX+1];
|
||||||
size_t utf_len = wcrtomb(bytes, ch, NULL);
|
size_t utf_len = wcrtomb(bytes, ch, NULL);
|
||||||
for (i = 0 ; i < utf_len; i++) {
|
for (i = 0 ; i < utf_len; i++) {
|
||||||
input[(*size)++] = bytes[i];
|
input[(*size)++] = bytes[i];
|
||||||
}
|
}
|
||||||
input[*size] = '\0';
|
bytes[utf_len] = '\0';
|
||||||
_inp_clear_no_pad();
|
wprintw(inp_win, bytes);
|
||||||
wprintw(inp_win, input);
|
|
||||||
|
|
||||||
display_size++;
|
display_size++;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user