svnno****@sourc*****
svnno****@sourc*****
2014年 3月 31日 (月) 17:30:14 JST
Revision: 5564 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5564 Author: doda Date: 2014-03-31 17:30:11 +0900 (Mon, 31 Mar 2014) Log Message: ----------- 画面全体消去(ED 2)時に、カーソル位置をホームに移動するよう動作を変更可能にした。 # DECSET 8200 で設定 Modified Paths: -------------- trunk/teraterm/teraterm/vtterm.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtterm.c =================================================================== --- trunk/teraterm/teraterm/vtterm.c 2014-03-31 06:34:11 UTC (rev 5563) +++ trunk/teraterm/teraterm/vtterm.c 2014-03-31 08:30:11 UTC (rev 5564) @@ -66,6 +66,7 @@ static BOOL RelativeOrgMode; static BOOL InsertMode; static BOOL LFMode; +static BOOL ClearThenHome; static BOOL AutoWrapMode; static BOOL FocusReportMode; static BOOL AltScr; @@ -259,6 +260,7 @@ MouseReportMode = IdMouseTrackNone; MouseReportExtMode = IdMouseTrackExtNone; DecLocatorFlag = 0; + ClearThenHome = FALSE; ChangeTerminalID(); @@ -1538,6 +1540,14 @@ // Erase screen (scroll out) BuffClearScreen(); UpdateWindow(HVTWin); + if (ClearThenHome && !isCursorOnStatusLine) { + if (RelativeOrgMode) { + MoveCursor(0, 0); + } + else { + MoveCursor(CursorLeftM, CursorTop); + } + } break; } } @@ -2715,6 +2725,9 @@ AcceptWheelToCursor = TRUE; } break; + case 8200: // ClearThenHome + ClearThenHome = TRUE; + break; case 14001: // NetTerm mouse mode if (ts.MouseEventTracking) MouseReportMode = IdMouseTrackNetTerm; @@ -2856,6 +2869,9 @@ case 7786: // Wheel to Cursor translation AcceptWheelToCursor = FALSE; break; + case 8200: // ClearThenHome + ClearThenHome = FALSE; + break; case 14001: // NetTerm mouse mode MouseReportMode = IdMouseTrackNone; break; @@ -3235,6 +3251,12 @@ else resp = 2; break; + case 8200: // ClearThenHome + if (ClearThenHome) + resp = 1; + else + resp = 2; + break; case 14001: // NetTerm Mouse Reporting (TT) if (!ts.MouseEventTracking) resp = 4;