[Ttssh2-commit] [5735] [Control] - [Reset Terminal] で OSC 10 / 11 で設定した色もリセットするようにした。

svnno****@sourc***** svnno****@sourc*****
2014年 12月 9日 (火) 13:09:47 JST


Revision: 5735
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5735
Author:   doda
Date:     2014-12-09 13:09:46 +0900 (Tue, 09 Dec 2014)
Log Message:
-----------
[Control] - [Reset Terminal] で OSC 10/11 で設定した色もリセットするようにした。

Modified Paths:
--------------
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/vtdisp.c
    trunk/teraterm/teraterm/vtterm.c
    trunk/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2014-12-02 11:55:14 UTC (rev 5734)
+++ trunk/teraterm/common/tttypes.h	2014-12-09 04:09:46 UTC (rev 5735)
@@ -94,6 +94,7 @@
 #define CS_VT_UNDERBG      267
 #define CS_TEK_FG          268
 #define CS_TEK_BG          269
+#define CS_ANSICOLOR_ALL   270
 #define CS_UNSPEC          0xffffffff
 #define CS_ALL             CS_UNSPEC
 

Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2014-12-02 11:55:14 UTC (rev 5734)
+++ trunk/teraterm/teraterm/vtdisp.c	2014-12-09 04:09:46 UTC (rev 5735)
@@ -3543,7 +3543,6 @@
 			ANSIColor[IdFore ] = ts.VTColor[0]; // use text color for "white"
 		}
 		break;
-		break;
 	case CS_VT_NORMALBG:
 		BGVTColor[1] = ts.VTColor[1];
 		if ((ts.ColorFlag & CF_USETEXTCOLOR)!=0) {
@@ -3555,7 +3554,6 @@
 			BGURLColor[1] = ts.VTColor[1];
 		}
 		break;
-		break;
 	case CS_VT_BOLDFG:    BGVTBoldColor[0] = ts.VTBoldColor[0]; break;
 	case CS_VT_BOLDBG:    BGVTBoldColor[1] = ts.VTBoldColor[1]; break;
 	case CS_VT_BLINKFG:   BGVTBlinkColor[0] = ts.VTBlinkColor[0]; break;
@@ -3569,7 +3567,33 @@
 		break;
 	case CS_TEK_BG:
 		break;
+	case CS_ANSICOLOR_ALL:
+		InitColorTable();
+		DispSetNearestColors(0, 255, NULL);
+		break;
 	case CS_ALL:
+		// VT color Foreground
+		BGVTColor[0] = ts.VTColor[0];
+		BGVTBoldColor[0] = ts.VTBoldColor[0];
+		BGVTBlinkColor[0] = ts.VTBlinkColor[0];
+		BGVTReverseColor[0] = ts.VTReverseColor[0];
+		BGURLColor[0] = ts.URLColor[0];
+
+		// VT color Background
+		BGVTColor[1] = ts.VTColor[1];
+		BGVTReverseColor[1] = ts.VTReverseColor[1];
+		if (ts.UseNormalBGColor) {
+			BGVTBoldColor[1] = ts.VTColor[1];
+			BGVTBlinkColor[1] = ts.VTColor[1];
+			BGURLColor[1] = ts.VTColor[1];
+		}
+		else {
+			BGVTBoldColor[1] = ts.VTBoldColor[1];
+			BGVTBlinkColor[1] = ts.VTBlinkColor[1];
+			BGURLColor[1] = ts.URLColor[1];
+		}
+
+		// ANSI Color / xterm 256 color
 		InitColorTable();
 		DispSetNearestColors(0, 255, NULL);
 		break;

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2014-12-02 11:55:14 UTC (rev 5734)
+++ trunk/teraterm/teraterm/vtterm.c	2014-12-09 04:09:46 UTC (rev 5735)
@@ -4515,7 +4515,7 @@
 	  	if (CheckST(b, utf8_stat)) {
 			switch (Param[1]) {
 			case 104:
-				DispResetColor(CS_ALL);
+				DispResetColor(CS_ANSICOLOR_ALL);
 				break;
 			case 110:
 			case 111:

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2014-12-02 11:55:14 UTC (rev 5734)
+++ trunk/teraterm/teraterm/vtwin.cpp	2014-12-09 04:09:46 UTC (rev 5735)
@@ -4536,6 +4536,7 @@
 	HideStatusLine();
 	DispScrollHomePos();
 	ResetTerminal();
+	DispResetColor(CS_ALL);
 	UnlockBuffer();
 
 	LButton = FALSE;



Ttssh2-commit メーリングリストの案内