]> andersk Git - test.git/commitdiff
Removed color pair restrictions.
authorJay Weisskopf <jay@jayschwa.net>
Sun, 1 Jan 2012 08:01:25 +0000 (02:01 -0600)
committerJay Weisskopf <jay@jayschwa.net>
Sun, 1 Jan 2012 12:08:24 +0000 (06:08 -0600)
Sane color pairs are the application's responsibility. Widely-used
terminals such as PuTTY and gnome-terminal do not restrict colors.

demo/vt100.js
shellinabox/vt100.js
shellinabox/vt100.jspp

index 5c93b83135f07daf6cd76d984728f46705444245..81095cef1843672f7b79abacb1b4bbdb40f73f8a 100644 (file)
@@ -3299,20 +3299,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;
 };
 
index 5c93b83135f07daf6cd76d984728f46705444245..81095cef1843672f7b79abacb1b4bbdb40f73f8a 100644 (file)
@@ -3299,20 +3299,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;
 };
 
index eecf04833de157e1a1fd60716ebedfc9d2b0ca1c..4529b27f05f85bc2434905b2d581d8ed4622df89 100755 (executable)
@@ -3299,20 +3299,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;
 };
 
This page took 0.269322 seconds and 5 git commands to generate.