Revision: 7963 https://osdn.net/projects/ttssh2/scm/svn/commits/7963 Author: zmatsuo Date: 2019-08-15 23:02:49 +0900 (Thu, 15 Aug 2019) Log Message: ----------- 全角折り返しをとりあえず実装 Modified Paths: -------------- branches/unicode_buf/teraterm/teraterm/vtterm.c -------------- next part -------------- Modified: branches/unicode_buf/teraterm/teraterm/vtterm.c =================================================================== --- branches/unicode_buf/teraterm/teraterm/vtterm.c 2019-08-15 14:02:24 UTC (rev 7962) +++ branches/unicode_buf/teraterm/teraterm/vtterm.c 2019-08-15 14:02:49 UTC (rev 7963) @@ -5474,6 +5474,7 @@ { unsigned short cset; char r; + int LineEnd; TCharAttr CharAttrTmp; CharAttrTmp = CharAttr; @@ -5513,6 +5514,33 @@ } } + if (CursorX > CursorRightM) + LineEnd = NumOfColumns - 1; + else + LineEnd = CursorRightM; + + BOOL half_width = (UnicodeGetWidthProperty(code) == 'H') ? TRUE : FALSE; + + if (Wrap) { + CarriageReturn(FALSE); + LineFeed(LF,FALSE); + if (ts.EnableContinuedLineCopy) + CharAttrTmp.Attr |= AttrLineContinued; + } + else if (CursorX > LineEnd - 1) { + if (AutoWrapMode) { + if (ts.EnableContinuedLineCopy) { + CharAttrTmp.Attr |= AttrLineContinued; + if (half_width == FALSE && CursorX == LineEnd) { + // full width\x8Fo\x97͂\xAA\x94\xBC\x95\xAA\x8Fo\x97͂ɂȂ\xE7\x82Ȃ\xA2\x82悤\x82\xC90x20\x82\xF0\x8Fo\x97\xCD + BuffPutChar(0x20, CharAttr, FALSE); + } + } + CarriageReturn(FALSE); + LineFeed(LF,FALSE); + } + } + Wrap = FALSE; r = BuffPutUnicode(code, CharAttrTmp, InsertMode); if (CursorX == CursorRightM || CursorX >= NumOfColumns - 1) { UpdateStr();