1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

core: move test of invalid UTF-8 char length from gui-chat.c to wee-utf8.c

This commit is contained in:
Sebastien Helleu
2013-06-29 16:10:09 +02:00
parent b311ca894d
commit 37b8aef96d
2 changed files with 9 additions and 9 deletions
+1 -9
View File
@@ -150,19 +150,11 @@ gui_chat_utf_char_valid (const char *utf_char)
int
gui_chat_char_size_screen (const char *utf_char)
{
int size_screen;
/* if char is invalid, it will be displayed as one space on screen */
if (!gui_chat_utf_char_valid (utf_char))
return 1;
size_screen = utf8_char_size_screen (utf_char);
/*
* ensure the size is always >= 1, to prevent any display bug
* (for example UTF-8 char U+26C4 returns size < 1)
*/
return (size_screen >= 1) ? size_screen : 1;
return utf8_char_size_screen (utf_char);
}
/*