1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Compute correct number of cells with CONFIG_COMBINE

Otherwise, there are unnecessary spaces at the end of lines in tables containing
combining characters.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
This commit is contained in:
Fabienne Ducroquet 2016-04-12 21:02:36 +02:00 committed by Witold Filipczyk
parent ec30a09a36
commit c1140f54c4

View File

@ -651,7 +651,12 @@ good_char:
unicode_val_T data; unicode_val_T data;
data = utf8_to_unicode(&chars, end); data = utf8_to_unicode(&chars, end);
#ifdef CONFIG_COMBINE
if (data == UCS_SOFT_HYPHEN
|| (data != UCS_NO_CHAR && wcwidth((wchar_t)data) == 0))
#else
if (data == UCS_SOFT_HYPHEN) if (data == UCS_SOFT_HYPHEN)
#endif
continue; continue;
if (data == UCS_NO_BREAK_SPACE if (data == UCS_NO_BREAK_SPACE