Revision: 10062 https://osdn.net/projects/ttssh2/scm/svn/commits/10062 Author: zmatsuo Date: 2022-07-16 01:31:18 +0900 (Sat, 16 Jul 2022) Log Message: ----------- 空行を選択したときスペースが1文字コピーされる ticket #45086 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/45086 Modified Paths: -------------- trunk/teraterm/teraterm/buffer.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/buffer.c =================================================================== --- trunk/teraterm/teraterm/buffer.c 2022-07-15 14:59:28 UTC (rev 10061) +++ trunk/teraterm/teraterm/buffer.c 2022-07-15 16:31:18 UTC (rev 10062) @@ -1624,9 +1624,12 @@ } } - // \x95s\x97v\x83X\x83y\x81[\x83X\x82ׂ\xE9 - // IEnd=\x83R\x83s\x81[\x82\xAA\x95K\x97v\x82ȍŌ\xE3\x82̈ʒu - if (!LineContinued) { + // IEnd=\x83R\x83s\x81[\x82\xAA\x95K\x97v\x82ȍŌ\xE3\x82̈ʒu + if (LineContinued) { + // \x8Ds\x82̈\xEA\x94ԍŌ\xE3\x82܂ŃR\x83s\x81[\x82\xB7\x82\xE9 + IEnd++; + } + else { // \x8E\x9F\x82̍s\x82Ɍp\x91\xB1\x82\xB5\x82Ă\xA2\x82Ȃ\xA2\x82Ȃ\xE7\x81A\x83X\x83y\x81[\x83X\x82\xF0\x8D폜\x82\xB7\x82\xE9 while (IEnd >= IStart) { // \x83R\x83s\x81[\x95s\x97v\x82\xC8" "(0x20)\x82\xF0\x8D폜 @@ -1633,6 +1636,7 @@ const buff_char_t *b = &CodeBuffW[TmpPtr + IEnd]; if (b->u32 != 0x20) { // \x83X\x83y\x81[\x83X\x88ȊO\x82\xBE\x82\xC1\x82\xBD + IEnd++; break; } if (IEnd == 0) { @@ -1644,8 +1648,9 @@ } // 1\x83\x89\x83C\x83\x93\x95\xB6\x8E\x9A\x97\xF1\x82\xF0\x83R\x83s\x81[\x82\xB7\x82\xE9 + // IEnd=\x83R\x83s\x81[\x82\xAA\x95K\x97v\x82ȍŌ\xE3\x82̈ʒu+1 x = IStart; - while (x <= IEnd) { + while (x < IEnd) { const buff_char_t *b = &CodeBuffW[TmpPtr + x]; if (b->u32 != 0) { str_w[k++] = b->wc2[0];