Pārlūkot izejas kodu

restore intensity color

Yasuhiro Matsumoto 9 gadi atpakaļ
vecāks
revīzija
2426aac3d8
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      colorable_windows.go

+ 2 - 2
colorable_windows.go

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