svnno****@sourc*****
svnno****@sourc*****
2013年 5月 13日 (月) 14:07:31 JST
Revision: 5259 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5259 Author: doda Date: 2013-05-13 14:07:31 +0900 (Mon, 13 May 2013) Log Message: ----------- マクロからのデータに対してはPasteDelayPerLineが働かないように修正。 http://sourceforge.jp/ticket/browse.php?group_id=1412&tid=31336 Modified Paths: -------------- trunk/teraterm/teraterm/clipboar.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/clipboar.c =================================================================== --- trunk/teraterm/teraterm/clipboar.c 2013-05-11 13:18:51 UTC (rev 5258) +++ trunk/teraterm/teraterm/clipboar.c 2013-05-13 05:07:31 UTC (rev 5259) @@ -40,6 +40,7 @@ static BOOL CBDDE; static BOOL CBWIDE; static BOOL CBEchoOnly; +static BOOL CBInsertDelay = FALSE; static HFONT DlgClipboardFont; @@ -150,7 +151,12 @@ CBMemPtr2 = 0; CBDDE = FALSE; CBWIDE = FALSE; + CBInsertDelay = FALSE; + if (BuffSize==0) { //clipboard + if (ts.PasteDelayPerLine > 0) { + CBInsertDelay = TRUE; + } if (OpenClipboard(HWin)) { if (Cf == CF_UNICODETEXT) { // \x93\\x82\xE8\x95t\x82\xAF\x8F\x88\x97\x9D\x82ł\xCD CBMemHandle \x82ł͂Ȃ\xAD dde \x82Ɠ\xAF\x82\xB6\x82悤\x82\xC9 CBMemPtr \x82\xAA\x8Eg\x82\xED\x82\xEA\x82\xE9 @@ -229,6 +235,13 @@ CBDDE = TRUE; CBWIDE = FALSE; + if (ts.PasteDelayPerLine > 0) { + CBInsertDelay = TRUE; + } + else { + CBInsertDelay = FALSE; + } + if (IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(HWin)) { Cf = CF_UNICODETEXT; if ((tmpHandle = GetClipboardData(CF_UNICODETEXT)) == NULL) { @@ -368,9 +381,11 @@ return; } - now = GetTickCount(); - if (now - lastcr < (DWORD)ts.PasteDelayPerLine) { - return; + if (CBInsertDelay) { + now = GetTickCount(); + if (now - lastcr < (DWORD)ts.PasteDelayPerLine) { + return; + } } if (CBRetrySend) { @@ -399,7 +414,7 @@ if (CBSendCR && (CBMemPtr[CBMemPtr2]==0x0a)) { CBMemPtr2++; // added PasteDelayPerLine (2009.4.12 maya) - if (ts.PasteDelayPerLine > 0) { + if (CBInsertDelay) { lastcr = now; CBSendCR = FALSE; SetTimer(HVTWin, IdPasteDelayTimer, ts.PasteDelayPerLine, NULL); @@ -545,6 +560,7 @@ CBMemPtr2 = 0; CBAddCR = FALSE; CBEchoOnly = FALSE; + CBInsertDelay = FALSE; }