commit fc59754

uint  ·  2026-10-11 21:30:32 +0000 UTC
parent fb0c7a6
invert foreground&|background color for cursor color
2 files changed,  +3, -4
+0, -2
1@@ -34,8 +34,6 @@ static const char term_name[] = "vt100";
2 /* AARRGGBB */
3 static const uint32_t default_fg = 0xffffffff;
4 static const uint32_t default_bg = 0xff000000;
5-static const uint32_t cursor_fg  = 0xff000000;
6-static const uint32_t cursor_bg  = 0xffffffff;
7 
8 static const uint32_t color_table[16] = {
9 	0xff000000, /* black */
+3, -2
 1@@ -354,8 +354,9 @@ static void run(void)
 2 				uint32_t bg = reverse ? r->fg : r->bg;
 3 
 4 				if (cursor) {
 5-					fg = cursor_fg;
 6-					bg = cursor_bg;
 7+					uint32_t tmp = fg;
 8+					fg = bg;
 9+					bg = tmp;
10 				}
11 
12 				if (!r->dmg)