[Ttssh2-commit] [3765] リサイズ時の挙動を調整。

svnno****@sourc***** svnno****@sourc*****
2010年 2月 2日 (火) 10:33:11 JST


Revision: 3765
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3765
Author:   doda
Date:     2010-02-02 10:33:11 +0900 (Tue, 02 Feb 2010)

Log Message:
-----------
リサイズ時の挙動を調整。

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


-------------- next part --------------
Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2010-02-01 15:04:35 UTC (rev 3764)
+++ trunk/teraterm/teraterm/buffer.c	2010-02-02 01:33:11 UTC (rev 3765)
@@ -2765,7 +2765,7 @@
 
 void BuffChangeTerminalSize(int Nx, int Ny)
 {
-	int i, Nb, W, H, l, d;
+	int i, Nb, W, H;
 	BOOL St;
 
 	Ny = Ny + StatusLine;
@@ -2806,32 +2806,22 @@
 		}
 
 		if ((ts.TermFlag & TF_CLEARONRESIZE) == 0 && Ny != NumOfLines) {
-			BuffEnd += Ny - NumOfLines;
 			if (Ny > NumOfLines) {
-				if (BuffEnd > NumOfLinesInBuff) {
-					BuffEndAbs -= BuffEnd - NumOfLinesInBuff;
-					if (BuffEndAbs < 0) {
-						BuffEndAbs += NumOfLinesInBuff;
-					}
-					BuffEnd = NumOfLinesInBuff;
+				CursorY += Ny - NumOfLines;
+				if (Ny > BuffEnd) {
+					CursorY -= Ny - BuffEnd;
+					BuffEnd = Ny;
 				}
 			}
-/*
-			l = NumOfLines - Ny;
-			d = NumOfLines - 1 - StatusLine - CursorY;
-			if (l > 0 && d > 0) {
-				if (d < l) {
-					l -= d;
+			else {
+				if (Ny  > CursorY + StatusLine + 1) {
+					BuffEnd -= NumOfLines - Ny;
 				}
 				else {
-					d = l;
-					l = 0;
+					BuffEnd -= NumOfLines - 1 - StatusLine - CursorY;
+					CursorY = Ny - 1 - StatusLine;
 				}
-				BuffEnd -= d;
 			}
-
-			CursorY -= l;
-*/
 		}
 
 		NumOfColumns = Nx;



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