瀏覽代碼

restore intensity color

Yasuhiro Matsumoto 9 年之前
父節點
當前提交
2426aac3d8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      colorable_windows.go

+ 2 - 2
colorable_windows.go

@@ -535,7 +535,7 @@ loop:
 					case n == 27:
 						attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4)
 					case 30 <= n && n <= 37:
-						attr = (attr & backgroundMask)
+						attr = (attr & backgroundMask) | (attr & foregroundIntensity)
 						if (n-30)&1 != 0 {
 							attr |= foregroundRed
 						}
@@ -562,7 +562,7 @@ loop:
 						attr &= backgroundMask
 						attr |= w.oldattr & foregroundMask
 					case 40 <= n && n <= 47:
-						attr = (attr & foregroundMask)
+						attr = (attr & backgroundMask) | (attr & backgroundIntensity)
 						if (n-40)&1 != 0 {
 							attr |= backgroundRed
 						}