improve utf8 related stuff

This commit is contained in:
unK
2008-10-07 15:40:06 +02:00
parent a85cfcd8eb
commit c6fea611bf
4 changed files with 75 additions and 34 deletions

View File

@@ -54,7 +54,13 @@ void Scrollpad::Add(string str)
tab_size = 8-itsXPos%8;
if (s[i] != '\t')
{
# ifdef UTF8_ENABLED
itsXPos += wcwidth(s[i]);
# else
itsXPos++;
# endif
}
else
itsXPos += tab_size;