in help_init(), properly use mbstrlen() instead of strlen() when
calculating the amount of space available for "^Space" and "M-Space" git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3515 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
4239c3c218
commit
d8d1e26e54
|
@ -441,7 +441,7 @@ void help_init(void)
|
||||||
* of blank space. If this entry takes up more than
|
* of blank space. If this entry takes up more than
|
||||||
* one entry's worth of space, use two to display
|
* one entry's worth of space, use two to display
|
||||||
* it. */
|
* it. */
|
||||||
if (strlen(space_ptr) > 6)
|
if (mbstrlen(space_ptr) > 6)
|
||||||
entries++;
|
entries++;
|
||||||
} else
|
} else
|
||||||
/* Otherwise, truncate it so that it takes up only
|
/* Otherwise, truncate it so that it takes up only
|
||||||
|
@ -489,7 +489,7 @@ void help_init(void)
|
||||||
/* If we're here, we have at least two entries worth of
|
/* If we're here, we have at least two entries worth of
|
||||||
* blank space. If this entry takes up more than one
|
* blank space. If this entry takes up more than one
|
||||||
* entry's worth of space, use two to display it. */
|
* entry's worth of space, use two to display it. */
|
||||||
if (strlen(space_ptr) > 5)
|
if (mbstrlen(space_ptr) > 5)
|
||||||
entries++;
|
entries++;
|
||||||
|
|
||||||
ptr += sprintf(ptr, "M-%s", space_ptr);
|
ptr += sprintf(ptr, "M-%s", space_ptr);
|
||||||
|
|
Loading…
Reference in New Issue