mirror of
https://github.com/systemd/systemd
synced 2024-09-30 05:15:19 +00:00
utf8: assume tabs are 8 characters wide when written to console
This commit is contained in:
parent
3c2f2146f5
commit
b4aaba2bb0
|
@ -187,6 +187,9 @@ static int utf8_char_console_width(const char *str) {
|
|||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (c == '\t')
|
||||
return 8; /* Assume a tab width of 8 */
|
||||
|
||||
/* TODO: we should detect combining characters */
|
||||
|
||||
return unichar_iswide(c) ? 2 : 1;
|
||||
|
|
Loading…
Reference in a new issue