• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7087 (tree)
Time2018-04-02 18:07:36
Authordoda

Log Message

DECCARA による属性変更で、色が正しく無くなるのを修正 #38169

文字色/背景色が適用対象じゃない時に色番号をコピーしていたため。

Change Summary

Incremental Difference

--- trunk/doc/ja/html/about/history.html (revision 7086)
+++ trunk/doc/ja/html/about/history.html (revision 7087)
@@ -38,6 +38,7 @@
3838 <li>マウストラッキング有効時、画面クリック後にメニューが使えなくなる問題を修正した。</li>
3939 <li>DECCARA(矩形領域属性変更)、および DECRARA(矩形領域属性反転)制御シーケンスの対象領域が正しくない問題を修正した。</li>
4040 <li>DECCARA 制御シーケンスで漢字が壊れる問題を修正した。</li>
41+ <li>DECCARA 制御シーケンスで色が壊れる問題を修正した。</li>
4142 </ul>
4243 </li>
4344 </ul>
--- trunk/doc/en/html/about/history.html (revision 7086)
+++ trunk/doc/en/html/about/history.html (revision 7087)
@@ -38,6 +38,7 @@
3838 <li>When the mouse tracking is enabled, the menu can not be selected after clicking the screen.</li>
3939 <li>The target area of the DECCARA (Change Attributes in Rectangular Area) and DECRARA (Reverse Attributes in Rectangular Area) control sequence is invalid.</li>
4040 <li>The DECCARA control sequence breaks kanji character.</li>
41+ <li>The DECCARA control sequence breaks the color of cells.</li>
4142 </ul>
4243 </li>
4344 </ul>
--- trunk/tests/#38169-deccara-color.sh (revision 0)
+++ trunk/tests/#38169-deccara-color.sh (revision 7087)
@@ -0,0 +1,73 @@
1+#!/bin/sh
2+#
3+# DECCARA による色変更テストプログラム
4+# 大文字の行と小文字の行の表示が同じならば OK
5+#
6+
7+printf '\033[H\033[2J'
8+
9+printf 'A: '
10+printf 'xxx\033[4mxx\033[1;5;31;43mXX\033[24mXXX\033[mxxx\033[4mxx\033[1;5;31;43mXX\033[24mX\033[4mXXX\033[24mX\033[m'
11+printf 'xxx\033[34mxx\033[1;5;43mXX\033[31mXXXX\033[34mXXX\033[31mX\033[m'
12+printf 'xxx\033[46mxx\033[1;5;31;46mXX\033[43mXXXX\033[46mXXX\033[43mX\033[m\n'
13+printf 'a: \033[0*x'
14+printf 'xxxxx\033[1;5;31;43mXXXXX\033[mxxxxx\033[1;5;31;43mXXXXXXX\033[m'
15+printf 'xxxxx\033[1;5;31;43mXXXXXXXXXX\033[m'
16+printf 'xxxxx\033[1;5;31;43mXXXXXXXXXX\033[m'
17+printf '\n'
18+printf '\033[2;7;2;10;4$r'
19+printf '\033[2;21;2;26;4$r'
20+printf '\033[2;31;2;34;4$r'
21+printf '\033[2;41;2;44;34$r'
22+printf '\033[2;51;2;54;34$r'
23+printf '\033[2;61;2;64;46$r'
24+printf '\033[2;71;2;74;46$r'
25+
26+printf '\n'
27+
28+printf 'B: '
29+printf 'xxx\033[4mxx\033[1;5;31;43mXX\033[24mXXX\033[mxxx\033[4mxx\033[1;5;31;43mXX\033[24mX\033[4mXXX\033[24mX\033[m'
30+printf 'xxx\033[34mxx\033[1;5;43mXX\033[31mXXXX\033[34mXXX\033[31mX\033[m'
31+printf 'xxx\033[46mxx\033[1;5;31;46mXX\033[43mXXXX\033[46mXXX\033[43mX\033[m\n'
32+printf 'b: \033[2*x'
33+printf 'xxxxx\033[1;5;31;43mXXXXX\033[mxxxxx\033[1;5;31;43mXXXXXXX\033[m'
34+printf 'xxxxx\033[1;5;31;43mXXXXXXXXXX\033[m'
35+printf 'xxxxx\033[1;5;31;43mXXXXXXXXXX\033[m'
36+printf '\n'
37+printf '\033[5;7;5;10;4$r'
38+printf '\033[5;21;5;26;4$r'
39+printf '\033[5;31;5;34;4$r'
40+printf '\033[5;41;5;44;34$r'
41+printf '\033[5;51;5;54;34$r'
42+printf '\033[5;61;5;64;46$r'
43+printf '\033[5;71;5;74;46$r'
44+
45+printf '\033[0*x\n'
46+
47+printf 'C: \033[1;5;31;43mX\033[4mXXXXXXXXXX\033[34mXXXXXXXXXX\033[46mXXXXXXXXXXXXXXXX\033[22;25m\033[32;7;78;7;9999$x\n'
48+printf 'C: \033[1;5mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[22;25m\033[32;8;78;8;9999$x\n'
49+printf 'C: \033[1;5mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[22;25m\033[32;9;78;9;9999$x\n'
50+printf 'C: \033[1;5mXXXXXXX\033[24mXXXXXXXXXX\033[31mXXXXXXXXXX\033[43mXXXXXXXXXX\033[m\n'
51+printf 'c: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
52+printf 'c: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
53+printf 'c: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
54+printf 'c: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
55+printf '\033[11;7;14;16;4$r'
56+printf '\033[11;27;14;36;34$r'
57+printf '\033[11;47;14;56;46$r'
58+
59+printf '\033[2*x\n'
60+
61+printf 'D: \033[1;5;31;43mX\033[4mXXXXXX\033[24mXXXX\033[34mXXXXXX\033[31mXXXX\033[46mXXXXXX\033[43mXXXXXXXXXX\033[m\n'
62+printf 'D: \033[1;5;31;43mX\033[4mXXXXXX\033[24mXXXX\033[34mXXXXXX\033[31mXXXX\033[46mXXXXXX\033[43mXXXXXXXXXX\033[m\n'
63+printf 'D: \033[1;5;31;43mXX\033[4mXXXXX\033[24mXXXXX\033[34mXXXXX\033[31mXXXXX\033[46mXXXXX\033[43mXXXXXXXXXXX\033[m\n'
64+printf 'D: \033[1;5;31;43mX\033[4mXXXXXX\033[24mXXXX\033[34mXXXXXX\033[31mXXXX\033[46mXXXXXX\033[43mXXXXXXXXXX\033[m\n'
65+printf 'd: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
66+printf 'd: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
67+printf 'd: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
68+printf 'd: \033[1;5;31;43mXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\033[m\n'
69+printf '\033[20;7;23;16;4$r'
70+printf '\033[20;27;23;36;34$r'
71+printf '\033[20;47;23;56;46$r'
72+
73+printf '\033[0*x'
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
--- trunk/teraterm/teraterm/buffer.c (revision 7086)
+++ trunk/teraterm/teraterm/buffer.c (revision 7087)
@@ -1205,20 +1205,20 @@
12051205 if (XStart>0 && (AttrBuff[j] & AttrKanji)) {
12061206 AttrBuff[j] = AttrBuff[j] & ~mask->Attr | attr->Attr;
12071207 AttrBuff2[j] = AttrBuff2[j] & ~mask->Attr2 | attr->Attr2;
1208- AttrBuffFG[j] = attr->Fore;
1209- AttrBuffBG[j] = attr->Back;
1208+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[j] = attr->Fore; }
1209+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[j] = attr->Back; }
12101210 }
12111211 while (++j < Ptr+XStart+C) {
12121212 AttrBuff[j] = AttrBuff[j] & ~mask->Attr | attr->Attr;
12131213 AttrBuff2[j] = AttrBuff2[j] & ~mask->Attr2 | attr->Attr2;
1214- AttrBuffFG[j] = attr->Fore;
1215- AttrBuffBG[j] = attr->Back;
1214+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[j] = attr->Fore; }
1215+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[j] = attr->Back; }
12161216 }
12171217 if (XStart+C<NumOfColumns && (AttrBuff[j-1] & AttrKanji)) {
12181218 AttrBuff[j] = AttrBuff[j] & ~mask->Attr | attr->Attr;
12191219 AttrBuff2[j] = AttrBuff2[j] & ~mask->Attr2 | attr->Attr2;
1220- AttrBuffFG[j] = attr->Fore;
1221- AttrBuffBG[j] = attr->Back;
1220+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[j] = attr->Fore; }
1221+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[j] = attr->Back; }
12221222 }
12231223 Ptr = NextLinePtr(Ptr);
12241224 }
@@ -1266,20 +1266,20 @@
12661266 if (XStart > 0 && (AttrBuff[i] & AttrKanji)) {
12671267 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
12681268 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1269- AttrBuffFG[i] = attr->Fore;
1270- AttrBuffBG[i] = attr->Back;
1269+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1270+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
12711271 }
12721272 while (++i < endp) {
12731273 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
12741274 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1275- AttrBuffFG[i] = attr->Fore;
1276- AttrBuffBG[i] = attr->Back;
1275+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1276+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
12771277 }
12781278 if (XEnd < NumOfColumns-1 && (AttrBuff[i-1] & AttrKanji)) {
12791279 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
12801280 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1281- AttrBuffFG[i] = attr->Fore;
1282- AttrBuffBG[i] = attr->Back;
1281+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1282+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
12831283 }
12841284 }
12851285 else {
@@ -1289,14 +1289,14 @@
12891289 if (XStart > 0 && (AttrBuff[i] & AttrKanji)) {
12901290 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
12911291 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1292- AttrBuffFG[i] = attr->Fore;
1293- AttrBuffBG[i] = attr->Back;
1292+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1293+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
12941294 }
12951295 while (++i < endp) {
12961296 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
12971297 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1298- AttrBuffFG[i] = attr->Fore;
1299- AttrBuffBG[i] = attr->Back;
1298+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1299+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
13001300 }
13011301
13021302 for (j=0; j < YEnd-YStart-1; j++) {
@@ -1307,8 +1307,8 @@
13071307 while (i < endp) {
13081308 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
13091309 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1310- AttrBuffFG[i] = attr->Fore;
1311- AttrBuffBG[i] = attr->Back;
1310+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1311+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
13121312 i++;
13131313 }
13141314 }
@@ -1320,15 +1320,15 @@
13201320 while (i < endp) {
13211321 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
13221322 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1323- AttrBuffFG[i] = attr->Fore;
1324- AttrBuffBG[i] = attr->Back;
1323+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1324+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
13251325 i++;
13261326 }
13271327 if (XEnd < NumOfColumns-1 && (AttrBuff[i-1] & AttrKanji)) {
13281328 AttrBuff[i] = AttrBuff[i] & ~mask->Attr | attr->Attr;
13291329 AttrBuff2[i] = AttrBuff2[i] & ~mask->Attr2 | attr->Attr2;
1330- AttrBuffFG[i] = attr->Fore;
1331- AttrBuffBG[i] = attr->Back;
1330+ if (mask->Attr2 & Attr2Fore) { AttrBuffFG[i] = attr->Fore; }
1331+ if (mask->Attr2 & Attr2Back) { AttrBuffBG[i] = attr->Back; }
13321332 }
13331333 }
13341334 }
Show on old repository browser