[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[thhsieh: New patch for rxvt-2.7.1]



----- Forwarded message from Tung-Han Hsieh <thhsieh> -----

Date: Tue, 5 Oct 1999 08:04:45 +0800
From: Tung-Han Hsieh <thhsieh>
To: xcin@linux.org.tw
Subject: New patch for rxvt-2.7.1
X-Mailer: Mutt 0.95.4us

Hello,

底下是一個新的 rxvt-2.7.1 patch, 修正了以下幾個問題:

1. rxvt.tbl 語法問題。

2. mouse copy/paste buffer 為空時 paste 造成 rxvt crash 的問題。

3. 使用 mouse select 一段文字,中文的部分只有第一個 byte 反白,
   第二個 byte 卻沒有的問題。

其中 1, 2 是我自己修的,希望可以被 rxvt.org 採納,第三是 rxvt.org
修的,本來想要自己來抓,但因為太懶惰了,直接 mail 過去反應,沒想到
不到一天的時間就修好了 :p

2.7.1 還有其他問題,都是我懶得修的問題,再寫信過去反應 :-))

(ps. 有興趣使用 rxvt-2.7.x 系列的朋友,請直接使用 2.7.1 + 
     http://xcin.linux.org.tw/rxvt/bugs.html 裏頭的 patch, 不要再
     用 2.7.0 了。新的 2.7.1 的修正我不會再加入 2.7.0 中, 且 2.7.0
     過一陣子會被淘汰)


T.H.Hsieh 

diff -r --unified orig/rxvt-2.7.1/doc/rxvt.tbl rxvt-2.7.1/doc/rxvt.tbl
--- orig/rxvt-2.7.1/doc/rxvt.tbl	Tue Sep 28 20:38:03 1999
+++ rxvt-2.7.1/doc/rxvt.tbl	Fri Oct  1 15:34:28 1999
@@ -233,15 +233,15 @@
 .br 
 .RS 
 .IP 
-.TS 
-tab(`); 
-l l .
-\fBfont\fP: `\ 7x14 
-\fBfont1\fP: `\ 6x10 
-\fBfont2\fP: `\ 6x13 
-\fBfont3\fP: `\ 8x13 
-\fBfont4\fP: `\ 9x15 
-.TE 
+\fBfont\fP:      7x14 
+.br
+\fBfont1\fP:     6x10 
+.br
+\fBfont2\fP:     6x13 
+.br
+\fBfont3\fP:     8x13 
+.br
+\fBfont4\fP:     9x15 
 .RE 
 .IP 
 .IP "\fBboldFont:\fP \fIfontname\fP" 
@@ -417,28 +417,41 @@
 versions of the same)\&.
 Here is a list of the colours with their \fBrgb\&.txt\fP names\&.
 .PP 
-.TS 
-tab(`); 
-l l l .
-\fBcolor0\fP `\ (black) `\ = Black 
-\fBcolor1\fP `\ (red) `\ = Red3 
-\fBcolor2\fP `\ (green) `\ = Green3 
-\fBcolor3\fP `\ (yellow) `\ = Yellow3 
-\fBcolor4\fP `\ (blue) `\ = Blue3 
-\fBcolor5\fP `\ (magenta) `\ = Magenta3 
-\fBcolor6\fP `\ (cyan) `\ = Cyan3 
-\fBcolor7\fP `\ (white) `\ = AntiqueWhite 
-\fBcolor8\fP `\ (bright black) `\ = Grey25 
-\fBcolor9\fP `\ (bright red) `\ = Red 
-\fBcolor10\fP `\ (bright green) `\ = Green 
-\fBcolor11\fP `\ (bright yellow) `\ = Yellow 
-\fBcolor12\fP `\ (bright blue) `\ = Blue 
-\fBcolor13\fP `\ (bright magenta) `\ = Magenta 
-\fBcolor14\fP `\ (bright cyan) `\ = Cyan 
-\fBcolor15\fP `\ (bright white) `\ = White 
-\fBforeground\fP `\  `\ = Black 
-\fBbackground\fP `\  `\ = White 
-.TE 
+\fBcolor0\fP         (black)              = Black 
+.br
+\fBcolor1\fP         (red)                = Red3 
+.br
+\fBcolor2\fP         (green)              = Green3 
+.br
+\fBcolor3\fP         (yellow)             = Yellow3 
+.br
+\fBcolor4\fP         (blue)               = Blue3 
+.br
+\fBcolor5\fP         (magenta)            = Magenta3 
+.br
+\fBcolor6\fP         (cyan)               = Cyan3 
+.br
+\fBcolor7\fP         (white)              = AntiqueWhite 
+.br
+\fBcolor8\fP         (bright black)       = Grey25 
+.br
+\fBcolor9\fP         (bright red)         = Red 
+.br
+\fBcolor10\fP        (bright green)       = Green 
+.br
+\fBcolor11\fP        (bright yellow)      = Yellow 
+.br
+\fBcolor12\fP        (bright blue)        = Blue 
+.br
+\fBcolor13\fP        (bright magenta)     = Magenta 
+.br
+\fBcolor14\fP        (bright cyan)        = Cyan 
+.br
+\fBcolor15\fP        (bright white)       = White 
+.br
+\fBforeground\fP                          = Black 
+.br
+\fBbackground\fP                          = White 
 .PP 
 It is also possible to specify the colour values of \fBforeground\fP,
 \fBbackground\fP, \fBcursorColor\fP, \fBcursorColor2\fP, \fBcolorBD\fP, \fBcolorUL\fP
diff -r --unified orig/rxvt-2.7.1/src/screen.c rxvt-2.7.1/src/screen.c
--- orig/rxvt-2.7.1/src/screen.c	Mon Sep 27 16:21:30 1999
+++ rxvt-2.7.1/src/screen.c	Tue Oct  5 07:42:56 1999
@@ -2552,12 +2552,12 @@
 		    XChangeGC(Xdisplay, TermWin.gc, gcmask, &gcvalue);
 		    XFillRectangle(Xdisplay, drawBuffer, TermWin.gc,
 				   xpixel, ypixel - TermWin.font->ascent,
-				   Width2Pixel(1), Height2Pixel(1));
+				   Width2Pixel(len), Height2Pixel(1));
 		    SWAP_IT(gcvalue.foreground, gcvalue.background, ltmp);
 		    XChangeGC(Xdisplay, TermWin.gc, gcmask, &gcvalue);
 		} else
 		    CLEAR_CHARS(xpixel, ypixel - TermWin.font->ascent, len);
-		DRAW_STRING(draw_string, xpixel, ypixel, buffer, 1);
+		DRAW_STRING(draw_string, xpixel, ypixel, buffer, wlen);
 #ifndef NO_BOLDOVERSTRIKE
 		if (MONO_BOLD(rend))
 		    DRAW_STRING(draw_string, xpixel + 1, ypixel, buffer, wlen);
@@ -2828,6 +2828,8 @@
 	    XFree(ct.value);
 	    return;
 	}
+	if (! ct.value)
+	    continue;
 #ifdef MULTICHAR_SET
 	if (XmbTextPropertyToTextList(Xdisplay, &ct, &cl,
 				      &dummy_count) == Success)


----- End forwarded message -----


Reply to: