From 8d5beb560c09c9eac872200ffe0b989ea72de7ac Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Tue, 21 Jun 2005 20:37:04 +0000 Subject: [PATCH] in titlebar(), handle VERLEN's being a UTF-8 string git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/winio.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c0c49794..4efbe187 100644 --- a/ChangeLog +++ b/ChangeLog @@ -316,6 +316,9 @@ CVS code - done. This fixes a problem where the statusbar is not properly blanked after using the "Go To Line" prompt with the NO_HELP flag set. (DLR) + titlebar() + - Use actual_x() to calculate the number of characters VERMSG + takes up, in case it's UTF-8. (DLR) do_help() - Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for consistency. (DLR) diff --git a/src/winio.c b/src/winio.c index 49236a34..40f8666d 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2722,7 +2722,8 @@ void titlebar(const char *path) if (COLS > 4) { /* The version message should only take up 1/3 of the screen * minus one column. */ - mvwaddnstr(topwin, 0, 2, VERMSG, (COLS / 3) - 3); + mvwaddnstr(topwin, 0, 2, VERMSG, actual_x(VERMSG, + (COLS / 3) - 3)); waddstr(topwin, " "); } -- 2.39.5