[Ttssh2-commit] [3608] ハイパーリンクの色属性描画を復活させた。

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2009年 8月 26日 (水) 23:59:58 JST


Revision: 3608
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3608
Author:   yutakapon
Date:     2009-08-26 23:59:58 +0900 (Wed, 26 Aug 2009)

Log Message:
-----------
ハイパーリンクの色属性描画を復活させた。
なお、一度検出したハイパーリンク文字列を、手動で消され、ハイパーリンクでなくなった場合は、描画がそのまま残る。

Modified Paths:
--------------
    trunk/teraterm/teraterm/buffer.c
    trunk/teraterm/teraterm/vtdisp.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2009-08-25 16:06:38 UTC (rev 3607)
+++ trunk/teraterm/teraterm/buffer.c	2009-08-26 14:59:58 UTC (rev 3608)
@@ -1366,7 +1366,7 @@
 	if (x == 0) {
 		if (AttrLine > AttrBuff && (AttrLine[x-1] & AttrURL)) {
 			if (!(ch & 0x80 || url_char[ch]==0)) { // ‚©‚ÂURL\¬•¶Žš‚È‚ç
-				AttrLine[x] |= AttrURL; 
+				AttrLine[x] |= (AttrURL | AttrUnder); 
 			}
 		}
 		return;
@@ -1375,13 +1375,15 @@
 	if ((x-1>=0) && (AttrLine[x-1] & AttrURL) &&
 		!(ch & 0x80 || url_char[ch]==0)) {
 //		!((CodeLine[x] <= ' ') && !(AttrLine[x] & AttrKanji))) {
-			AttrLine[x] |= AttrURL; 
-//		AttrLine[x] |= (AttrURL | AttrUnder); 
+			AttrLine[x] |= (AttrURL | AttrUnder); 
 		return;
 	}
 
 	if ((x-2>=0) && !strncmp(&CodeLine[x-2], "://", 3)) {
 		int i, len = -1;
+		RECT rc;
+		int CaretX, CaretY;
+
 		if ((x-6>=0) && !strncmp(&CodeLine[x-6], "http", 4)) {
 			len = 6;
 		}
@@ -1403,9 +1405,22 @@
 		}
 #endif
 		for (i = 0; i <= len; i++) {
-				AttrLine[x-i] |= AttrURL; 
-//			AttrLine[x-i] |= (AttrURL | AttrUnder); 
+			AttrLine[x-i] |= (AttrURL | AttrUnder); 
 		}
+
+		/* ƒnƒCƒp[ƒŠƒ“ƒN‚̐F‘®«•ÏX‚́A‚·‚łɉæ–ʂ֏o—ÍŒã‚ɁAƒoƒbƒtƒ@‚ð‘k‚Á‚Ä URL ‘®«‚ð
+		 * •t‚¯’¼‚·‚Æ‚¢‚¤ƒƒWƒbƒN‚Å‚ ‚邽‚߁AF‚ª³‚µ‚­•`‰æ‚³‚ê‚È‚¢ê‡‚ª‚ ‚éB
+		 * ­X‹­ˆø‚¾‚ªAƒnƒCƒp[ƒŠƒ“ƒN‚ð”­Œ©‚µ‚½ƒ^ƒCƒ~ƒ“ƒO‚ŁA‚»‚̍s‚ɍĕ`‰æŽwŽ¦‚ðo‚·‚±‚ƂŁA
+		 * ƒŠƒAƒ‹ƒ^ƒCƒ€‚ȐF•`‰æ‚ðŽÀŒ»‚·‚éB
+		 * (2009.8.26 yutaka)
+		 */
+		CaretX = (0-WinOrgX)*FontWidth;
+		CaretY = (CursorY-WinOrgY)*FontHeight;
+		rc.left = CaretX;
+		rc.top = CaretY;
+		rc.right = CaretX + NumOfColumns * FontWidth;
+		rc.bottom = CaretY + FontHeight;
+		InvalidateRect(HVTWin, &rc, FALSE);
 	}
 #endif
 }

Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2009-08-25 16:06:38 UTC (rev 3607)
+++ trunk/teraterm/teraterm/vtdisp.c	2009-08-26 14:59:58 UTC (rev 3608)
@@ -1153,7 +1153,8 @@
   BGVTReverseColor[0] = ts.VTReverseColor[0];
   BGVTReverseColor[1] = ts.VTReverseColor[1];
 
-#if 0
+#if 1
+  // ƒnƒCƒp[ƒŠƒ“ƒN•`‰æ‚Ì•œŠˆB(2009.8.26 yutaka)
   /* begin - ishizaki */
   BGURLColor[0] = ts.URLColor[0];
   BGURLColor[1] = ts.URLColor[1];



Ttssh2-commit メーリングリストの案内
アーカイブの一覧に戻る