in do_credits(), display Florian König's name properly in UTF-8 mode;
since we can't dynamically set that element of the array to its UTF-8 equivalent when in UTF-8 mode, we have to use the ISO-8859-1 version and pass every string in the credits through make_mbstring() to make sure they're all UTF-8 (sigh) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2373 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
0099a8f45c
commit
4dc5838ccc
17
src/winio.c
17
src/winio.c
|
@ -4120,17 +4120,22 @@ void do_credits(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (crpos < CREDIT_LEN) {
|
if (crpos < CREDIT_LEN) {
|
||||||
const char *what = credits[crpos];
|
char *what;
|
||||||
size_t start_x;
|
size_t start_x;
|
||||||
|
|
||||||
if (what == NULL) {
|
if (credits[crpos] == NULL) {
|
||||||
assert(0 <= xlpos && xlpos < XLCREDIT_LEN);
|
assert(0 <= xlpos && xlpos < XLCREDIT_LEN);
|
||||||
what = _(xlcredits[xlpos]);
|
|
||||||
|
what = mallocstrcpy(NULL, _(xlcredits[xlpos]));
|
||||||
xlpos++;
|
xlpos++;
|
||||||
}
|
} else
|
||||||
|
what = make_mbstring(credits[crpos]);
|
||||||
|
|
||||||
start_x = COLS / 2 - strlenpt(what) / 2 - 1;
|
start_x = COLS / 2 - strlenpt(what) / 2 - 1;
|
||||||
mvwaddstr(edit, editwinrows - 1 - editwinrows % 2, start_x,
|
mvwaddstr(edit, editwinrows - 1 - (editwinrows % 2),
|
||||||
what);
|
start_x, what);
|
||||||
|
|
||||||
|
free(what);
|
||||||
}
|
}
|
||||||
|
|
||||||
napms(700);
|
napms(700);
|
||||||
|
|
Loading…
Reference in New Issue