Honor utf8 in diagonal graph lines ##graph

This commit is contained in:
pancake 2019-07-18 03:54:15 +02:00
parent aa50013606
commit 143a6a7c5a

View File

@ -329,7 +329,27 @@ loop:
if (!(x == x2 && y == y2)) {
int i = (*chizzle == '_' && sy < 0) ? 1 : 0;
if (G(x, y - i)) {
W(chizzle);
if (useUtf8) {
switch (*chizzle) {
case '/':
W("");
break;
case '\\':
W("");
break;
case '|':
W("");
break;
case '_':
W("");
break;
default:
W("?");
break;
}
} else {
W(chizzle);
}
}
goto loop;
}