From 1cef2b0ef264859db487f0c8b59f01ef509fddd1 Mon Sep 17 00:00:00 2001 From: Jay Weisskopf Date: Sun, 1 Jan 2012 02:01:25 -0600 Subject: [PATCH] Removed color pair restrictions. Sane color pairs are the application's responsibility. Widely-used terminals such as PuTTY and gnome-terminal do not restrict colors. --- demo/vt100.js | 14 -------------- shellinabox/vt100.js | 14 -------------- shellinabox/vt100.jspp | 14 -------------- 3 files changed, 42 deletions(-) diff --git a/demo/vt100.js b/demo/vt100.js index 317ce0c..dcecdfe 100644 --- a/demo/vt100.js +++ b/demo/vt100.js @@ -3280,20 +3280,6 @@ VT100.prototype.updateStyle = function() { if (this.attr & 0x1000 /* ATTR_BLINK */) { bg ^= 8; } - // Make some readability enhancements. Most notably, disallow identical - // background and foreground colors. - if (bg == fg) { - if ((fg ^= 8) == 7) { - fg = 8; - } - } - // And disallow bright colors on a light-grey background. - if (bg == 7 && fg >= 8) { - if ((fg -= 8) == 7) { - fg = 8; - } - } - this.color = 'ansi' + fg + ' bgAnsi' + bg; }; diff --git a/shellinabox/vt100.js b/shellinabox/vt100.js index 317ce0c..dcecdfe 100644 --- a/shellinabox/vt100.js +++ b/shellinabox/vt100.js @@ -3280,20 +3280,6 @@ VT100.prototype.updateStyle = function() { if (this.attr & 0x1000 /* ATTR_BLINK */) { bg ^= 8; } - // Make some readability enhancements. Most notably, disallow identical - // background and foreground colors. - if (bg == fg) { - if ((fg ^= 8) == 7) { - fg = 8; - } - } - // And disallow bright colors on a light-grey background. - if (bg == 7 && fg >= 8) { - if ((fg -= 8) == 7) { - fg = 8; - } - } - this.color = 'ansi' + fg + ' bgAnsi' + bg; }; diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp index 77bb89d..6f3ad86 100755 --- a/shellinabox/vt100.jspp +++ b/shellinabox/vt100.jspp @@ -3280,20 +3280,6 @@ VT100.prototype.updateStyle = function() { if (this.attr & ATTR_BLINK) { bg ^= 8; } - // Make some readability enhancements. Most notably, disallow identical - // background and foreground colors. - if (bg == fg) { - if ((fg ^= 8) == 7) { - fg = 8; - } - } - // And disallow bright colors on a light-grey background. - if (bg == 7 && fg >= 8) { - if ((fg -= 8) == 7) { - fg = 8; - } - } - this.color = 'ansi' + fg + ' bgAnsi' + bg; };