[Ttssh2-commit] [8363] データ送信時、最後に不要なdelayが入らないよう修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 11月 6日 (水) 22:27:41 JST


Revision: 8363
          https://osdn.net/projects/ttssh2/scm/svn/commits/8363
Author:   zmatsuo
Date:     2019-11-06 22:27:41 +0900 (Wed, 06 Nov 2019)
Log Message:
-----------
データ送信時、最後に不要なdelayが入らないよう修正

Modified Paths:
--------------
    branches/unicode_buf/teraterm/teraterm/sendmem.cpp

-------------- next part --------------
Modified: branches/unicode_buf/teraterm/teraterm/sendmem.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/sendmem.cpp	2019-11-06 13:27:30 UTC (rev 8362)
+++ branches/unicode_buf/teraterm/teraterm/sendmem.cpp	2019-11-06 13:27:41 UTC (rev 8363)
@@ -208,14 +208,6 @@
 		return;
 	}
 
-	if (p->waited) {
-		const DWORD delay = p->delay_per_line > 0 ? p->delay_per_line : p->delay_per_char;
-		if (GetTickCount() - p->last_send_tick < delay) {
-			// \x83E\x83G\x83C\x83g\x82\xB7\x82\xE9
-			return;
-		}
-	}
-
 	// \x8FI\x92[?
 	if (p->send_left == 0) {
 		// \x8FI\x97\xB9, \x91\x97\x90M\x83o\x83b\x83t\x83@\x82\xAA\x8B\xF3\x82ɂȂ\xE9\x82܂ő҂\xC2
@@ -233,6 +225,14 @@
 		}
 	}
 
+	if (p->waited) {
+		const DWORD delay = p->delay_per_line > 0 ? p->delay_per_line : p->delay_per_char;
+		if (GetTickCount() - p->last_send_tick < delay) {
+			// \x83E\x83G\x83C\x83g\x82\xB7\x82\xE9
+			return;
+		}
+	}
+
 	// \x91\x97\x90M\x82ł\xAB\x82\xE9\x83o\x83b\x83t\x83@\x83T\x83C\x83Y
 	size_t buff_len;
 	{
@@ -321,7 +321,7 @@
 		p->dlg->RefreshNum(p->send_index - out_buff_use, p->send_len);
 	}
 
-	if (need_delay) {
+	if (p->send_left != 0 && need_delay) {
 		// wait\x82ɓ\xFC\x82\xE9
 		p->waited = TRUE;
 		p->last_send_tick = GetTickCount();


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