File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ const (
27
27
backgroundRed = 0x40
28
28
backgroundIntensity = 0x80
29
29
backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity )
30
+ commonLvbReverse = 0x4000
31
+ commonLvbUnderscore = 0x8000
30
32
31
33
cENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4
32
34
)
@@ -683,14 +685,18 @@ loop:
683
685
switch {
684
686
case n == 0 || n == 100 :
685
687
attr = w .oldattr
686
- case 1 <= n && n <= 5 :
688
+ case n == 4 :
689
+ attr |= commonLvbUnderscore
690
+ case (1 <= n && n <= 3 ) || n == 5 :
687
691
attr |= foregroundIntensity
688
692
case n == 7 :
689
- attr = ((attr & foregroundMask ) << 4 ) | ((attr & backgroundMask ) >> 4 )
690
- case n == 22 || n == 25 :
691
- attr |= foregroundIntensity
693
+ attr |= commonLvbReverse
694
+ case n == 22 :
695
+ attr &^= foregroundIntensity
696
+ case n == 24 :
697
+ attr &^= commonLvbUnderscore
692
698
case n == 27 :
693
- attr = (( attr & foregroundMask ) << 4 ) | (( attr & backgroundMask ) >> 4 )
699
+ attr &^= commonLvbReverse
694
700
case 30 <= n && n <= 37 :
695
701
attr &= backgroundMask
696
702
if (n - 30 )& 1 != 0 {
You can’t perform that action at this time.
0 commit comments