[Ttssh2-commit] [3744] Alternate Screen Buffer ( 拡張 : DECSET 1047-1049) に対応。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 1月 28日 (木) 10:40:38 JST


Revision: 3744
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3744
Author:   doda
Date:     2010-01-28 10:40:37 +0900 (Thu, 28 Jan 2010)

Log Message:
-----------
Alternate Screen Buffer (拡張: DECSET 1047-1049)に対応。

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtterm.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2010-01-27 22:20:42 UTC (rev 3743)
+++ trunk/teraterm/teraterm/vtterm.c	2010-01-28 01:40:37 UTC (rev 3744)
@@ -2122,7 +2122,24 @@
 	    if (ts.MouseEventTracking)
 	      FocusReportMode = TRUE;
 	    break;
-      }
+	  case 1047: // Alternate Screen Buffer
+	    if ((ts.TermFlag & TF_ALTSCR) && !AltScr) {
+	      BuffSaveScreen();
+	      AltScr = TRUE;
+	    }
+	    break;
+	  case 1048: // Save Cursor Position (Alternate Screen Buffer)
+	    if (ts.TermFlag & TF_ALTSCR) {
+	      SaveCursor();
+	    }
+	  case 1049: // Alternate Screen Buffer
+	    if ((ts.TermFlag & TF_ALTSCR) && !AltScr) {
+	      SaveCursor();
+	      BuffSaveScreen();
+	      BuffClearScreen();
+	      AltScr = TRUE;
+	    }
+	}
     }
 
     void CSQ_i_Mode()		// MC (DEC)
@@ -2215,6 +2232,26 @@
 	  case 1002: // Button-Event Mouse Tracking
 	  case 1003: MouseReportMode = IdMouseTrackNone; break; // Any-Event Mouse Tracking
 	  case 1004: FocusReportMode = FALSE; break; // Focus Report
+	  case 1047: // Alternate Screen Buffer
+	    if ((ts.TermFlag & TF_ALTSCR) && AltScr) {
+	      BuffClearScreen();
+	      BuffRestoreScreen();
+	      AltScr = FALSE;
+	    }
+	    break;
+	  case 1048: // Save Cursor Position (Alternate Screen Buffer)
+	    if (ts.TermFlag & TF_ALTSCR) {
+	      RestoreCursor();
+	    }
+	    break;
+	  case 1049: // Alternate Screen Buffer
+	    if ((ts.TermFlag & TF_ALTSCR) && AltScr) {
+	      BuffClearScreen();
+	      BuffRestoreScreen();
+	      RestoreCursor();
+	      AltScr = FALSE;
+	    }
+	    break;
 	}
     }
 



Ttssh2-commit メーリングリストの案内
Back to archive index