[ttssh2-commit] [10323] 文字のセル数が増加したとき、描画されない場合があったので修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 10月 18日 (火) 00:19:34 JST


Revision: 10323
          https://osdn.net/projects/ttssh2/scm/svn/commits/10323
Author:   zmatsuo
Date:     2022-10-18 00:19:33 +0900 (Tue, 18 Oct 2022)
Log Message:
-----------
文字のセル数が増加したとき、描画されない場合があったので修正

ticket #44424

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/44424

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

-------------- next part --------------
Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2022-10-17 15:19:23 UTC (rev 10322)
+++ trunk/teraterm/teraterm/buffer.c	2022-10-17 15:19:33 UTC (rev 10323)
@@ -2850,7 +2850,21 @@
 			move_x = 1;
 
 			p->cell++;
-			StrChangeCount++;	// \x8Dĕ`\x89\xE6\x94͈͂\xF01cell\x91\x9D\x82₷
+			if(StrChangeCount == 0) {
+				// \x95`\x89\xE6\x94͈͂\xAA\x83N\x83\x8A\x83A\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x81A\x8Dēx\x90ݒ肷\x82\xE9
+				StrChangeCount = p->cell;
+				if (CursorX == 0) {
+					// \x83J\x81[\x83\\x83\x8B\x82\xAA\x8D\xB6\x92[\x82̎\x9E
+					StrChangeStart = 0;
+				}
+				else {
+					StrChangeStart = CursorX - StrChangeCount + 1;
+				}
+			}
+			else {
+				// \x95`\x89\xE6\x94͈͂\xF01cell\x91\x9D\x82₷
+				StrChangeCount++;
+			}
 
 			// \x83J\x81[\x83\\x83\x8B\x88ʒu\x82̕\xB6\x8E\x9A\x82\xCD padding\x82ɂ\xB7\x82\xE9
 			BuffSetChar(&CodeLineW[CursorX], 0, 'H');
@@ -2882,28 +2896,13 @@
 				}
 			}
 			else {
-				if (IsBuffPadding(b)) {
-					// \x83J\x81[\x83\\x83\x8B\x82\xAA2\x83Z\x83\x8B\x82̉E\x91\xA4
-					StrChangeStart = CursorX - 1;
-					StrChangeCount = 2;
+				StrChangeCount = p->cell;
+				if (CursorX == 0) {
+					// \x83J\x81[\x83\\x83\x8B\x82\xAA\x8D\xB6\x92[\x82̎\x9E
+					StrChangeStart = 0;
 				}
 				else {
-					// \x83J\x81[\x83\\x83\x8B\x82\xAA1\x83Z\x83\x8B\x96\x94\x82́A2\x83Z\x83\x8B\x82̍\xB6\x91\xA4
-					if (!BuffIsHalfWidthFromPropery(&ts, p->WidthProperty)) {
-						// 1\x82‘O\x82̕\xB6\x8E\x9A\x82\xAA2\x83Z\x83\x8B
-						StrChangeCount = 2;
-					}
-					else {
-						// 1\x82‘O\x82̕\xB6\x8E\x9A\x82\xAA1\x83Z\x83\x8B
-						StrChangeCount = 1;
-					}
-					if (CursorX == 0) {
-						// \x83J\x81[\x83\\x83\x8B\x82\xAA\x8D\xB6\x92[\x82̎\x9E
-						StrChangeStart = 0;
-					}
-					else {
-						StrChangeStart = CursorX - StrChangeCount;
-					}
+					StrChangeStart = CursorX - StrChangeCount + 1;
 				}
 			}
 		}


ttssh2-commit メーリングリストの案内
Back to archive index