[Ttssh2-commit] [3312] 継続行コピーがうまく働かない場合があるのを修正。

svnno****@sourc***** svnno****@sourc*****
2009年 4月 15日 (水) 19:22:42 JST


Revision: 3312
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3312
Author:   doda
Date:     2009-04-15 19:22:42 +0900 (Wed, 15 Apr 2009)

Log Message:
-----------
継続行コピーがうまく働かない場合があるのを修正。

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


-------------- next part --------------
Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2009-04-15 09:38:47 UTC (rev 3311)
+++ trunk/teraterm/teraterm/buffer.c	2009-04-15 10:22:42 UTC (rev 3312)
@@ -718,6 +718,13 @@
 //  XStart: start position of erasing
 //  Count: number of characters to be erased
 {
+#ifndef NO_COPYLINE_FIX
+  BOOL LineContinued=FALSE;
+
+  if (ts.EnableContinuedLineCopy && XStart == 0 && (AttrLine[0] & AttrLineContinued))
+    LineContinued = TRUE;
+#endif /* NO_COPYLINE_FIX */
+
   if (ts.Language==IdJapanese)
     EraseKanji(1); /* if cursor is on right half of a kanji, erase the kanji */
 
@@ -728,6 +735,11 @@
   memset(&(AttrLineFG[XStart]),CurCharAttr.Fore,Count);
   memset(&(AttrLineBG[XStart]),CurCharAttr.Back,Count);
 
+#ifndef NO_COPYLINE_FIX
+  if (LineContinued)
+    BuffLineContinued(TRUE);
+#endif /* NO_COPYLINE_FIX */
+
   DispEraseCharsInLine(XStart, Count);
 }
 
@@ -1359,6 +1371,12 @@
 {
   int XStart;
 
+#ifndef NO_COPYLINE_FIX
+  if (ts.EnableContinuedLineCopy && CursorX == 0 && (AttrLine[0] & AttrLineContinued)) {
+    Attr.Attr |= AttrLineContinued;
+  }
+#endif /* NO_COPYLINE_FIX */
+
   if (ts.Language==IdJapanese)
   {
     EraseKanji(1); /* if cursor is on right half of a kanji, erase the kanji */
@@ -1421,6 +1439,12 @@
 {
   int XStart;
 
+#ifndef NO_COPYLINE_FIX
+  if (ts.EnableContinuedLineCopy && CursorX == 0 && (AttrLine[0] | AttrLineContinued)) {
+    Attr.Attr |= AttrLineContinued;
+  }
+#endif /* NO_COPYLINE_FIX */
+
   EraseKanji(1); /* if cursor is on right half of a kanji, erase the kanji */
 
   if (Insert)
@@ -2892,11 +2916,15 @@
 }
 
 #ifndef NO_COPYLINE_FIX
-void SetLineContinued()
+void BuffLineContinued(BOOL mode)
 {
-    if (ts.EnableContinuedLineCopy) {
-	  AttrLine[0] = AttrLine[0] | AttrLineContinued;
-    }
+	if (ts.EnableContinuedLineCopy) {
+		if (mode) {
+			AttrLine[0] = AttrLine[0] | AttrLineContinued;
+		} else {
+			AttrLine[0] = AttrLine[0] & (~AttrLineContinued);
+		}
+	}
 }
 #endif /* NO_COPYLINE_FIX */
 

Modified: trunk/teraterm/teraterm/buffer.h
===================================================================
--- trunk/teraterm/teraterm/buffer.h	2009-04-15 09:38:47 UTC (rev 3311)
+++ trunk/teraterm/teraterm/buffer.h	2009-04-15 10:22:42 UTC (rev 3312)
@@ -61,7 +61,9 @@
 void ClearTabStop(int Ps);
 void ShowStatusLine(int Show);
 #ifndef NO_COPYLINE_FIX
-void SetLineContinued();
+void BuffLineContinued(BOOL mode);
+#define SetLineContinued() BuffLineContinued(TRUE)
+#define ClearLineContinued() BuffLineContinued(FALSE)
 #endif /* NO_COPYLINE_FIX */
 void BuffRegionScrollUpNLines(int n);
 void BuffRegionScrollDownNLines(int n);

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2009-04-15 09:38:47 UTC (rev 3311)
+++ trunk/teraterm/teraterm/vtterm.c	2009-04-15 10:22:42 UTC (rev 3312)
@@ -342,6 +342,10 @@
 	else if (CursorY < NumOfLines-StatusLine-1)
 		MoveCursor(CursorX,CursorY+1);
 
+#ifndef NO_COPYLINE_FIX
+	ClearLineContinued();
+#endif /* NO_COPYLINE_FIX */
+
 	if (LFMode) CarriageReturn(logFlag);
 }
 



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