[ttssh2-commit] [10733] 罫線がうまく表示されない場合があったので修正

Zurück zum Archiv-Index
scmno****@osdn***** scmno****@osdn*****
2023年 6月 4日 (日) 01:55:48 JST


Revision: 10733
          https://osdn.net/projects/ttssh2/scm/svn/commits/10733
Author:   zmatsuo
Date:     2023-06-04 01:55:48 +0900 (Sun, 04 Jun 2023)
Log Message:
-----------
罫線がうまく表示されない場合があったので修正

Modified Paths:
--------------
    branches/input_charset/teraterm/teraterm/vtterm.c

-------------- next part --------------
Modified: branches/input_charset/teraterm/teraterm/vtterm.c
===================================================================
--- branches/input_charset/teraterm/teraterm/vtterm.c	2023-06-03 16:55:39 UTC (rev 10732)
+++ branches/input_charset/teraterm/teraterm/vtterm.c	2023-06-03 16:55:48 UTC (rev 10733)
@@ -5266,28 +5266,36 @@
 	{
 		int r;
 		BOOL is_update;
+		BOOL SpecialNew = FALSE;
 
+		if (code <= 0xff) {
+			SpecialNew = CharSetIsSpecial(code);
+			if (SpecialNew) {
+				code = code & 0x7F;
+			}
+		}
+
 		// Unicode\x82\xA9\x82\xE7DEC\x93\xC1\x8Eꕶ\x8E\x9A\x82ւ̃}\x83b\x83s\x83\x93\x83O
-		if (ts.UnicodeDecSpMapping) {
+		if (SpecialNew == FALSE && ts.UnicodeDecSpMapping) {
 			cset = UTF32ToDecSp(code);
 			if (((cset >> 8) & ts.UnicodeDecSpMapping) != 0) {
+				SpecialNew = TRUE;
 				code = cset & 0xff;
-				CharAttrTmp.Attr |= AttrSpecial;
 			}
 		}
 
-		if ((CharAttrTmp.Attr & AttrSpecial) == 0) {
-			if (Special) {
-				UpdateStr();
-				Special = FALSE;
-			}
-		} else {
-			if (!Special) {
-				UpdateStr();
-				Special = TRUE;
-			}
+		if (SpecialNew != Special) {
+			UpdateStr();
+			Special = SpecialNew;
 		}
 
+		if (Special) {
+			CharAttrTmp.Attr |= AttrSpecial;
+		}
+		else {
+			CharAttrTmp.Attr |= CharAttr.Attr;
+		}
+
 		if (CursorX > CursorRightM)
 			LineEnd = NumOfColumns - 1;
 		else


ttssh2-commit メーリングリストの案内
Zurück zum Archiv-Index