• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision8459 (tree)
Time2020-01-10 22:12:35
Authorzmatsuo

Log Message

クリップボードからのペースト時、改行を常に正規化する

- 設定など削除

- lng ファイルの DLG_TAB_COPYPASTE_NORMALIZE_LINEBREAK を削除
- iniファイルのNormalizeLineBreakOnPasteを削除
- CPF_NORMALIZE_LINEBREAK 削除

- リソース IDD_TABSHEET_COPYPASTE

- Normalize line break when pasting チェックボックスを削除
- レイアウト調整

Change Summary

Incremental Difference

--- trunk/doc/en/html/setup/teraterm-ini.html (revision 8458)
+++ trunk/doc/en/html/setup/teraterm-ini.html (revision 8459)
@@ -944,12 +944,6 @@
944944 <td></td>
945945 </tr>
946946 <tr>
947- <td id="NormalizeLineBreakOnPaste"><a href="../menu/setup-additional.html#NormalizeLineBreak">NormalizeLineBreakOnPaste</a></td>
948- <td style="width:250px;">off</td>
949- <td style="width:250px;">&lt;-</td>
950- <td></td>
951- </tr>
952- <tr>
953947 <td id="NotifyClipboardAccess"><a href="../menu/setup-additional.html#NotifyClipboardAccess">NotifyClipboardAccess</a></td>
954948 <td style="width:250px;">on</td>
955949 <td style="width:250px;">&lt;-</td>
--- trunk/doc/ja/html/setup/teraterm-ini.html (revision 8458)
+++ trunk/doc/ja/html/setup/teraterm-ini.html (revision 8459)
@@ -950,12 +950,6 @@
950950 <td></td>
951951 </tr>
952952 <tr>
953- <td id="NormalizeLineBreakOnPaste"><a href="../menu/setup-additional.html#NormalizeLineBreak">NormalizeLineBreakOnPaste</a></td>
954- <td style="width:250px;">off</td>
955- <td style="width:250px;">&lt;-</td>
956- <td></td>
957- </tr>
958- <tr>
959953 <td id="NotifyClipboardAccess"><a href="../menu/setup-additional.html#NotifyClipboardAccess">NotifyClipboardAccess</a></td>
960954 <td style="width:250px;">on</td>
961955 <td style="width:250px;">&lt;-</td>
--- trunk/teraterm/common/tt_res.h (revision 8458)
+++ trunk/teraterm/common/tt_res.h (revision 8459)
@@ -216,7 +216,6 @@
216216 #define IDC_SSH_SETUPDIR_STATIC_VSTORE 2562
217217 #define IDC_SSH_SETUPDIR_EDIT_VSTORE 2563
218218 #define IDC_TRIMNLCHAR 2564
219-#define IDC_NORMALIZE_LINEBREAK 2565
220219 #define IDC_CLIPBOARD_NOTIFY 2566
221220 #define IDC_LIST_HIDDEN_FONTS 2567
222221 #define IDC_TITLEFMT_GROUP 2568
--- trunk/teraterm/common/tttypes.h (revision 8458)
+++ trunk/teraterm/common/tttypes.h (revision 8459)
@@ -379,7 +379,6 @@
379379 #define CPF_CONFIRM_CHANGEPASTE 0x0010
380380 #define CPF_CONFIRM_CHANGEPASTE_CR 0x0020
381381 #define CPF_TRIM_TRAILING_NL 0x0100
382-#define CPF_NORMALIZE_LINEBREAK 0x0200
383382
384383 // Title Reporting Type
385384 #define IdTitleReportIgnore 0
--- trunk/teraterm/teraterm/addsetting.cpp (revision 8458)
+++ trunk/teraterm/teraterm/addsetting.cpp (revision 8459)
@@ -1,5 +1,5 @@
11 /*
2- * Copyright (C) 2008-2019 TeraTerm Project
2+ * Copyright (C) 2008-2020 TeraTerm Project
33 * All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
@@ -435,7 +435,6 @@
435435 { IDC_DISABLE_PASTE_MBUTTON, "DLG_TAB_COPYPASTE_MOUSEPASTEM" },
436436 { IDC_SELECT_LBUTTON, "DLG_TAB_COPYPASTE_SELECTLBUTTON" },
437437 { IDC_TRIMNLCHAR, "DLG_TAB_COPYPASTE_TRIM_TRAILING_NL" },
438- { IDC_NORMALIZE_LINEBREAK, "DLG_TAB_COPYPASTE_NORMALIZE_LINEBREAK" },
439438 { IDC_CONFIRM_CHANGE_PASTE, "DLG_TAB_COPYPASTE_CONFIRM_CHANGE_PASTE" },
440439 { IDC_CONFIRM_STRING_FILE_LABEL, "DLG_TAB_COPYPASTE_STRINGFILE" },
441440 { IDC_DELIMITER, "DLG_TAB_COPYPASTE_DELIMITER" },
@@ -469,10 +468,7 @@
469468 // (6)TrimTrailingNLonPaste
470469 SetCheck(IDC_TRIMNLCHAR, (ts.PasteFlag & CPF_TRIM_TRAILING_NL)?BST_CHECKED:BST_UNCHECKED);
471470
472- // (7)NormalizeLineBreak
473- SetCheck(IDC_NORMALIZE_LINEBREAK, (ts.PasteFlag & CPF_NORMALIZE_LINEBREAK)?BST_CHECKED:BST_UNCHECKED);
474-
475- // (8)ConfirmChangePaste
471+ // (7)ConfirmChangePaste
476472 SetCheck(IDC_CONFIRM_CHANGE_PASTE, (ts.PasteFlag & CPF_CONFIRM_CHANGEPASTE)?BST_CHECKED:BST_UNCHECKED);
477473
478474 // ファイルパス
@@ -485,15 +481,15 @@
485481 EnableDlgItem(IDC_CONFIRM_STRING_FILE_PATH, FALSE);
486482 }
487483
488- // (9)delimiter characters
484+ // (8)delimiter characters
489485 SetDlgItemTextA(IDC_DELIM_LIST, ts.DelimList);
490486
491- // (10)PasteDelayPerLine
487+ // (9)PasteDelayPerLine
492488 char buf[64];
493489 _snprintf_s(buf, sizeof(buf), "%d", ts.PasteDelayPerLine);
494490 SetDlgItemNum(IDC_PASTEDELAY_EDIT, ts.PasteDelayPerLine);
495491
496- // (11) SelectOnActivate
492+ // (10) SelectOnActivate
497493 SetCheck(IDC_SELECT_ON_ACTIVATE, ts.SelOnActive ? BST_CHECKED : BST_UNCHECKED);
498494
499495 // ダイアログにフォーカスを当てる
@@ -589,15 +585,7 @@
589585 ts.PasteFlag &= ~CPF_TRIM_TRAILING_NL;
590586 }
591587
592- // (7)
593- if (GetCheck(IDC_NORMALIZE_LINEBREAK)) {
594- ts.PasteFlag |= CPF_NORMALIZE_LINEBREAK;
595- }
596- else {
597- ts.PasteFlag &= ~CPF_NORMALIZE_LINEBREAK;
598- }
599-
600- // (8)IDC_CONFIRM_CHANGE_PASTE
588+ // (7)IDC_CONFIRM_CHANGE_PASTE
601589 if (GetCheck(IDC_CONFIRM_CHANGE_PASTE)) {
602590 ts.PasteFlag |= CPF_CONFIRM_CHANGEPASTE;
603591 }
@@ -606,10 +594,10 @@
606594 }
607595 GetDlgItemTextA(IDC_CONFIRM_STRING_FILE, ts.ConfirmChangePasteStringFile, sizeof(ts.ConfirmChangePasteStringFile));
608596
609- // (9)
597+ // (8)
610598 GetDlgItemTextA(IDC_DELIM_LIST, ts.DelimList, sizeof(ts.DelimList));
611599
612- // (10)
600+ // (9)
613601 GetDlgItemTextA(IDC_PASTEDELAY_EDIT, buf, sizeof(buf));
614602 val = atoi(buf);
615603 ts.PasteDelayPerLine =
@@ -616,7 +604,7 @@
616604 (val < 0) ? 0 :
617605 (val > 5000) ? 5000 : val;
618606
619- // (11) SelectOnActivate
607+ // (10) SelectOnActivate
620608 ts.SelOnActive = (GetCheck(IDC_SELECT_ON_ACTIVATE) == BST_CHECKED);
621609 }
622610
--- trunk/teraterm/teraterm/clipboar.c (revision 8458)
+++ trunk/teraterm/teraterm/clipboar.c (revision 8459)
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 1994-1998 T. Teranishi
3- * (C) 2006-2019 TeraTerm Project
3+ * (C) 2006-2020 TeraTerm Project
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without
@@ -225,10 +225,6 @@
225225 unsigned int len, need_len, alloc_len;
226226 HGLOBAL TmpHandle;
227227
228- if (!(ts.PasteFlag & CPF_NORMALIZE_LINEBREAK)) {
229- return TRUE;
230- }
231-
232228 p = CBMemPtr;
233229
234230 // 貼り付けデータの長さ(len)、および正規化後のデータの長さ(need_len)のカウント
@@ -855,7 +851,7 @@
855851 TrimTrailingNLW(str_w);
856852 }
857853
858- if (!(ts.PasteFlag & CPF_NORMALIZE_LINEBREAK)) {
854+ {
859855 // 改行を正規化
860856 wchar_t *dest = NormalizeLineBreakW(str_w);
861857 free(str_w);
--- trunk/teraterm/teraterm/sendmem.cpp (revision 8458)
+++ trunk/teraterm/teraterm/sendmem.cpp (revision 8459)
@@ -381,7 +381,7 @@
381381 {
382382 size_t src_len = *len;
383383 if (src_len == 0) {
384- return NULL;
384+ src_len = wcslen(src) + 1;
385385 }
386386 wchar_t *dest_top = (wchar_t *)malloc(sizeof(wchar_t) * src_len);
387387 if (dest_top == NULL) {
--- trunk/teraterm/ttpset/ttset.c (revision 8458)
+++ trunk/teraterm/ttpset/ttset.c (revision 8459)
@@ -2146,10 +2146,6 @@
21462146 if (GetOnOff(Section, "TrimTrailingNLonPaste", FName, FALSE))
21472147 ts->PasteFlag |= CPF_TRIM_TRAILING_NL;
21482148
2149- // Normalize line break when pasting
2150- if (GetOnOff(Section, "NormalizeLineBreakOnPaste", FName, FALSE))
2151- ts->PasteFlag |= CPF_NORMALIZE_LINEBREAK;
2152-
21532149 // List Inactive Font
21542150 ts->ListHiddenFonts = GetOnOff(Section, "ListHiddenFonts", FName, FALSE);
21552151
@@ -3495,10 +3491,6 @@
34953491 WriteOnOff(Section, "TrimTrailingNLonPaste", FName,
34963492 (WORD) (ts->PasteFlag & CPF_TRIM_TRAILING_NL));
34973493
3498- // Normalize line break when pasting
3499- WriteOnOff(Section, "NormalizeLineBreakOnPaste", FName,
3500- (WORD) (ts->PasteFlag & CPF_NORMALIZE_LINEBREAK));
3501-
35023494 // List Inactive Font
35033495 WriteOnOff(Section, "ListHiddenFonts", FName, ts->ListHiddenFonts);
35043496
Show on old repository browser