summarylogtreecommitdiffstats
path: root/intensity.patch
diff options
context:
space:
mode:
authorDan Elkouby2016-01-10 01:52:09 +0200
committerDan Elkouby2016-01-10 01:52:09 +0200
commit6155e51f5eddc51bd6a4df6bc8b545c04b504847 (patch)
tree1286213ff3f6d496cc69fbe3c89712f64f6cd6f5 /intensity.patch
downloadaur-6155e51f5eddc51bd6a4df6bc8b545c04b504847.tar.gz
Initial import
Diffstat (limited to 'intensity.patch')
-rw-r--r--intensity.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/intensity.patch b/intensity.patch
new file mode 100644
index 000000000000..4fab53cfcdad
--- /dev/null
+++ b/intensity.patch
@@ -0,0 +1,43 @@
+--- src/command.C
++++ src/command.C
+@@ -3966,7 +3966,7 @@
+ case 38: // set fg color, ISO 8613-6
+ if (nargs > i + 2 && arg[i + 1] == 5)
+ {
+- scr_color ((unsigned int) (minCOLOR + arg[i + 2]), Color_fg);
++ scr_color ((unsigned int) (((arg[i + 2] < 8) ? TOTAL_COLORS + 1 : minCOLOR) + arg[i + 2]), Color_fg);
+ i += 2;
+ }
+ break;
+@@ -3987,7 +3987,7 @@
+ case 48: // set bg color, ISO 8613-6
+ if (nargs > i + 2 && arg[i + 1] == 5)
+ {
+- scr_color ((unsigned int) (minCOLOR + arg[i + 2]), Color_bg);
++ scr_color ((unsigned int) (((arg[i + 2] < 8) ? TOTAL_COLORS + 1 : minCOLOR) + arg[i + 2]), Color_bg);
+ i += 2;
+ }
+ break;
+--- src/rxvt.h
++++ src/rxvt.h
+@@ -1450,6 +1450,8 @@
+ && IN_RANGE_EXC (base, minCOLOR, minBrightCOLOR))
+ base += minBrightCOLOR - minCOLOR;
+ #endif
++ if (base > TOTAL_COLORS)
++ base -= TOTAL_COLORS + 1 - minCOLOR;
+ return base;
+ }
+
+--- src/screen.C
++++ src/screen.C
+@@ -616,7 +616,7 @@
+ void
+ rxvt_term::scr_color (unsigned int color, int fgbg) NOTHROW
+ {
+- if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR))
++ if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR) && color <= TOTAL_COLORS)
+ color = fgbg;
+
+ if (fgbg == Color_fg)
+