[Ttssh2-commit] [5800] 画面左端での DECBI で、左端に漢字が有った場合にその文字が消えるのを修正

svnno****@sourc***** svnno****@sourc*****
2015年 2月 27日 (金) 23:57:33 JST


Revision: 5800
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5800
Author:   doda
Date:     2015-02-27 23:57:30 +0900 (Fri, 27 Feb 2015)
Log Message:
-----------
画面左端での DECBI で、左端に漢字が有った場合にその文字が消えるのを修正

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

-------------- next part --------------
Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2015-02-25 15:50:25 UTC (rev 5799)
+++ trunk/teraterm/teraterm/buffer.c	2015-02-27 14:57:30 UTC (rev 5800)
@@ -3801,7 +3801,7 @@
 	for (i = CursorTop; i <= CursorBottom; i++) {
 		Ptr = LPtr + CursorLeftM;
 
-		if (AttrBuff[LPtr + CursorRightM] & AttrKanji) {
+		if (AttrBuff[LPtr+CursorRightM] & AttrKanji) {
 			CodeBuff[LPtr+CursorRightM] = 0x20;
 			AttrBuff[LPtr+CursorRightM] &= ~AttrKanji;
 			if (CursorRightM < NumOfColumns-1) {
@@ -3833,7 +3833,7 @@
 		LPtr = NextLinePtr(LPtr);
 	}
 
-	BuffUpdateRect(CursorLeftM, CursorTop, CursorRightM, CursorBottom);
+	BuffUpdateRect(CursorLeftM-(CursorLeftM>0), CursorTop, CursorRightM+(CursorRightM<NumOfColumns-1), CursorBottom);
 }
 
 void BuffScrollRight(int count)
@@ -3852,10 +3852,10 @@
 			CodeBuff[LPtr+CursorRightM+1] = 0x20;
 		}
 
-		if (AttrBuff[Ptr+count-1] & AttrKanji) {
-			CodeBuff[Ptr+count-1] = 0x20;
-			AttrBuff[Ptr+count-1] &= ~AttrKanji;
-			CodeBuff[Ptr+count] = 0x20;
+		if (CursorLeftM > 0 && AttrBuff[Ptr-1] & AttrKanji) {
+			CodeBuff[Ptr-1] = 0x20;
+			AttrBuff[Ptr-1] &= ~AttrKanji;
+			CodeBuff[Ptr] = 0x20;
 		}
 
 		memmove(&(CodeBuff[Ptr+count]),   &(CodeBuff[Ptr]),   MoveLen);
@@ -3870,7 +3870,7 @@
 		memset(&(AttrBuffFG[Ptr]), AttrDefaultFG, count);
 		memset(&(AttrBuffBG[Ptr]), AttrDefaultBG, count);
 
-		if (AttrBuff[LPtr + CursorRightM] & AttrKanji) {
+		if (AttrBuff[LPtr+CursorRightM] & AttrKanji) {
 			CodeBuff[LPtr+CursorRightM] = 0x20;
 			AttrBuff[LPtr+CursorRightM] &= ~AttrKanji;
 		}
@@ -3878,7 +3878,7 @@
 		LPtr = NextLinePtr(LPtr);
 	}
 
-	BuffUpdateRect(CursorLeftM, CursorTop, CursorRightM, CursorBottom);
+	BuffUpdateRect(CursorLeftM-(CursorLeftM>0), CursorTop, CursorRightM+(CursorRightM<NumOfColumns-1), CursorBottom);
 }
 
 // \x8C\xBB\x8Dݍs\x82\xF0\x82܂邲\x82ƃo\x83b\x83t\x83@\x82Ɋi\x94[\x82\xB7\x82\xE9\x81B\x95Ԃ\xE8\x92l\x82͌\xBB\x8D݂̃J\x81[\x83\\x83\x8B\x88ʒu(X)\x81B



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