• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision5259 (tree)
Time2013-05-13 14:07:31
Authordoda

Log Message

マクロからのデータに対してはPasteDelayPerLineが働かないように修正。
http://sourceforge.jp/ticket/browse.php?group_id=1412&tid=31336

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/clipboar.c (revision 5258)
+++ trunk/teraterm/teraterm/clipboar.c (revision 5259)
@@ -40,6 +40,7 @@
4040 static BOOL CBDDE;
4141 static BOOL CBWIDE;
4242 static BOOL CBEchoOnly;
43+static BOOL CBInsertDelay = FALSE;
4344
4445 static HFONT DlgClipboardFont;
4546
@@ -150,7 +151,12 @@
150151 CBMemPtr2 = 0;
151152 CBDDE = FALSE;
152153 CBWIDE = FALSE;
154+ CBInsertDelay = FALSE;
155+
153156 if (BuffSize==0) { //clipboard
157+ if (ts.PasteDelayPerLine > 0) {
158+ CBInsertDelay = TRUE;
159+ }
154160 if (OpenClipboard(HWin)) {
155161 if (Cf == CF_UNICODETEXT) {
156162 // 貼り付け処理では CBMemHandle ではなく dde と同じように CBMemPtr が使われる
@@ -229,6 +235,13 @@
229235 CBDDE = TRUE;
230236 CBWIDE = FALSE;
231237
238+ if (ts.PasteDelayPerLine > 0) {
239+ CBInsertDelay = TRUE;
240+ }
241+ else {
242+ CBInsertDelay = FALSE;
243+ }
244+
232245 if (IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(HWin)) {
233246 Cf = CF_UNICODETEXT;
234247 if ((tmpHandle = GetClipboardData(CF_UNICODETEXT)) == NULL) {
@@ -368,9 +381,11 @@
368381 return;
369382 }
370383
371- now = GetTickCount();
372- if (now - lastcr < (DWORD)ts.PasteDelayPerLine) {
373- return;
384+ if (CBInsertDelay) {
385+ now = GetTickCount();
386+ if (now - lastcr < (DWORD)ts.PasteDelayPerLine) {
387+ return;
388+ }
374389 }
375390
376391 if (CBRetrySend) {
@@ -399,7 +414,7 @@
399414 if (CBSendCR && (CBMemPtr[CBMemPtr2]==0x0a)) {
400415 CBMemPtr2++;
401416 // added PasteDelayPerLine (2009.4.12 maya)
402- if (ts.PasteDelayPerLine > 0) {
417+ if (CBInsertDelay) {
403418 lastcr = now;
404419 CBSendCR = FALSE;
405420 SetTimer(HVTWin, IdPasteDelayTimer, ts.PasteDelayPerLine, NULL);
@@ -545,6 +560,7 @@
545560 CBMemPtr2 = 0;
546561 CBAddCR = FALSE;
547562 CBEchoOnly = FALSE;
563+ CBInsertDelay = FALSE;
548564 }
549565
550566
Show on old repository browser