From 1968054e368e0fbe106c62db2b6b130fdd99caae Mon Sep 17 00:00:00 2001 From: girst Date: Thu, 10 Jan 2019 15:16:31 +0100 Subject: [PATCH] fix broken halfcard rendering due to the faint hack, black cards were 1 byte shorter than red cards. this meant, that the offset for halfcard was off for red colors (as it has been adjusted for black cards), which caused printing errors in spider's foundation for overlapping red cards. can't pad with zero bytes (as that would end the string), but using an extra escape seems to be OK for xterm and vte-based terminals. --- schemes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemes.h b/schemes.h index 8bf2d98..7459a1d 100644 --- a/schemes.h +++ b/schemes.h @@ -24,7 +24,7 @@ struct scheme { #define RULCARD(s, r) \ ULCARD("\033[91m" s "\033[39m", r) #define BULCARD(s, r) \ - ULCARD("\033[2m" s "\033[22m", r) //WARN: requires hack in print_hi() + ULCARD("\033\033[2m" s "\033[22m", r)//WARN: requires hack in print_hi() #define USCARD(c) (char*[]){c} const struct scheme unicode_large_mono = { @@ -132,7 +132,7 @@ const struct scheme unicode_large_color = { "│\033[94m▚\033[39m", "╰─" }, - .halfcard = (int[]){6, 15, 4, 6}, + .halfcard = (int[]){6, 16, 4, 6}, .halfwidth = {2, 3, 999}, }; const struct scheme unicode_small_mono = { -- 2.39.3