• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision5800 (tree)
Time2015-02-27 23:57:30
Authordoda

Log Message

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

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/buffer.c (revision 5799)
+++ trunk/teraterm/teraterm/buffer.c (revision 5800)
@@ -3801,7 +3801,7 @@
38013801 for (i = CursorTop; i <= CursorBottom; i++) {
38023802 Ptr = LPtr + CursorLeftM;
38033803
3804- if (AttrBuff[LPtr + CursorRightM] & AttrKanji) {
3804+ if (AttrBuff[LPtr+CursorRightM] & AttrKanji) {
38053805 CodeBuff[LPtr+CursorRightM] = 0x20;
38063806 AttrBuff[LPtr+CursorRightM] &= ~AttrKanji;
38073807 if (CursorRightM < NumOfColumns-1) {
@@ -3833,7 +3833,7 @@
38333833 LPtr = NextLinePtr(LPtr);
38343834 }
38353835
3836- BuffUpdateRect(CursorLeftM, CursorTop, CursorRightM, CursorBottom);
3836+ BuffUpdateRect(CursorLeftM-(CursorLeftM>0), CursorTop, CursorRightM+(CursorRightM<NumOfColumns-1), CursorBottom);
38373837 }
38383838
38393839 void BuffScrollRight(int count)
@@ -3852,10 +3852,10 @@
38523852 CodeBuff[LPtr+CursorRightM+1] = 0x20;
38533853 }
38543854
3855- if (AttrBuff[Ptr+count-1] & AttrKanji) {
3856- CodeBuff[Ptr+count-1] = 0x20;
3857- AttrBuff[Ptr+count-1] &= ~AttrKanji;
3858- CodeBuff[Ptr+count] = 0x20;
3855+ if (CursorLeftM > 0 && AttrBuff[Ptr-1] & AttrKanji) {
3856+ CodeBuff[Ptr-1] = 0x20;
3857+ AttrBuff[Ptr-1] &= ~AttrKanji;
3858+ CodeBuff[Ptr] = 0x20;
38593859 }
38603860
38613861 memmove(&(CodeBuff[Ptr+count]), &(CodeBuff[Ptr]), MoveLen);
@@ -3870,7 +3870,7 @@
38703870 memset(&(AttrBuffFG[Ptr]), AttrDefaultFG, count);
38713871 memset(&(AttrBuffBG[Ptr]), AttrDefaultBG, count);
38723872
3873- if (AttrBuff[LPtr + CursorRightM] & AttrKanji) {
3873+ if (AttrBuff[LPtr+CursorRightM] & AttrKanji) {
38743874 CodeBuff[LPtr+CursorRightM] = 0x20;
38753875 AttrBuff[LPtr+CursorRightM] &= ~AttrKanji;
38763876 }
@@ -3878,7 +3878,7 @@
38783878 LPtr = NextLinePtr(LPtr);
38793879 }
38803880
3881- BuffUpdateRect(CursorLeftM, CursorTop, CursorRightM, CursorBottom);
3881+ BuffUpdateRect(CursorLeftM-(CursorLeftM>0), CursorTop, CursorRightM+(CursorRightM<NumOfColumns-1), CursorBottom);
38823882 }
38833883
38843884 // 現在行をまるごとバッファに格納する。返り値は現在のカーソル位置(X)。
Show on old repository browser