Explorar o código

restore intensity color

Yasuhiro Matsumoto %!s(int64=9) %!d(string=hai) anos
pai
achega
2426aac3d8
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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
 						}