diff options
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/textadept.c b/src/textadept.c index 46756305..3ea7d304 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -852,8 +852,9 @@ static void set_statusbar_text(const char *text, int bar) { int start = (bar == 0) ? 0 : statusbar_length[0]; int end = (bar == 0) ? COLS - statusbar_length[1] : COLS; for (int i = start; i < end; i++) mvaddch(LINES - 1, i, ' '); // clear - mvaddstr(LINES - 1, (bar == 0) ? 0 : COLS - strlen(text), text), refresh(); - statusbar_length[bar] = strlen(text); + int len = utf8strlen(text); + mvaddstr(LINES - 1, (bar == 0) ? 0 : COLS - len, text), refresh(); + statusbar_length[bar] = len; #endif } |