[ttssh2-commit] [9840] HTML強調で描画速度が遅くなることがあったので修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 3月 29日 (火) 00:24:22 JST


Revision: 9840
          https://osdn.net/projects/ttssh2/scm/svn/commits/9840
Author:   zmatsuo
Date:     2022-03-29 00:24:22 +0900 (Tue, 29 Mar 2022)
Log Message:
-----------
HTML強調で描画速度が遅くなることがあったので修正

ticket #44183

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

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

-------------- next part --------------
Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2022-03-28 15:24:07 UTC (rev 9839)
+++ trunk/teraterm/teraterm/buffer.c	2022-03-28 15:24:22 UTC (rev 9840)
@@ -380,7 +380,7 @@
 		y -= BuffStartAbs;
 	}
 	else {
-		y += (NumOfLines - BuffStartAbs);
+		y = y - BuffStartAbs + NumOfLinesInBuff;
 	}
 	*bx = x;
 	*by = y;
@@ -2344,7 +2344,7 @@
 	const buff_char_t *b;
 
 	// URL\x8B\xAD\x92\xB2\x82̐擪\x82\xF0\x92T\x82\xB7
-	TmpPtr = GetLinePtr(PageStart + cur_y) + cur_x - 1;
+	TmpPtr = GetLinePtr(PageStart + cur_y) + cur_x - 1;	// \x83J\x81[\x83\\x83\x8B\x88ʒu\x82\xF0\x83|\x83C\x83\x93\x83^\x82\xD6
 	while ((CodeBuffW[TmpPtr].attr & AttrURL) != 0) {
 		if (TmpPtr == 0) {
 			break;
@@ -2352,8 +2352,15 @@
 		TmpPtr--;
 	}
 	TmpPtr++;
+
+	// \x83|\x83C\x83\x93\x83^\x82\xF0\x83J\x81[\x83\\x83\x8B\x88ʒu\x82\xD6
 	GetPosFromPtr(&CodeBuffW[TmpPtr], &sx, &sy);
-	sy = sy - PageStart;
+	if (sy >= PageStart) {
+		sy = sy - PageStart;
+	} else {
+		sy = sy - PageStart;
+		sy = sy + NumOfLinesInBuff;
+	}
 
 	// \x8Ds\x96\x96\x82\xF0\x92T\x82\xB7
 	ex = NumOfColumns - 1;


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