in input_tab(), make sure that we don't set *place to the middle of a
multibyte character git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
e5b23bd2ff
Коммит
920e350d85
@ -55,6 +55,9 @@ CVS code -
|
|||||||
long instead of an unsigned int. (DLR)
|
long instead of an unsigned int. (DLR)
|
||||||
cwd_tab_completion(), browser_init()
|
cwd_tab_completion(), browser_init()
|
||||||
- Rename variable next to nextdir to avoid confusion. (DLR)
|
- Rename variable next to nextdir to avoid confusion. (DLR)
|
||||||
|
input_tab()
|
||||||
|
- Make sure that we don't set *place to the middle of a
|
||||||
|
multibyte character. (DLR)
|
||||||
do_browser()
|
do_browser()
|
||||||
- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
|
- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
|
||||||
consistency. (DLR)
|
consistency. (DLR)
|
||||||
|
@ -2225,7 +2225,10 @@ char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list)
|
|||||||
charmove(buf + common_len, buf + *place,
|
charmove(buf + common_len, buf + *place,
|
||||||
buflen - *place + 1);
|
buflen - *place + 1);
|
||||||
charcpy(buf, mzero, common_len);
|
charcpy(buf, mzero, common_len);
|
||||||
*place = common_len;
|
|
||||||
|
/* Make sure that we don't advance the cursor to the middle
|
||||||
|
* of a multibyte character. */
|
||||||
|
*place = mbstrnlen(buf, common_len);
|
||||||
} else if (*lastwastab == FALSE || num_matches < 2)
|
} else if (*lastwastab == FALSE || num_matches < 2)
|
||||||
*lastwastab = TRUE;
|
*lastwastab = TRUE;
|
||||||
else {
|
else {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user