Path: galaxy.trc.rwcp.or.jp!news.trc!nf2.iij.ad.jp!nr0.iij.ad.jp!news.iij.ad.jp!rim.or.jp!tamaru-news!Q.T.Honey!yynet.tama.tokyo.jp!yokota
From: Yoshinori Yokota/=?ISO-2022-JP?B?GyRCMiNFRDVBRkEbKEI=?=  <yokota@yynet.tama.tokyo.jp>
Newsgroups: fj.questions.unix
Subject: Re: [Where] Japanized bash patch
Date: 30 Nov 1997 16:21:18 GMT
Organization: YY-NET, Tama, Tokyo, JAPAN
Lines: 71
Message-ID: <65s3pu$vlg$1@cipher.yynet.tama.tokyo.jp>
References: <m367pc8er7.fsf@mp-chute.jwu.ac.jp>
	<65rcbg$8n4$1@pine.cix.chiba-u.ac.jp>
	<65robl$nvf$1@cipher.yynet.tama.tokyo.jp>
NNTP-Posting-Host: cipher.yynet.tama.tokyo.jp
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
X-Newsreader: mnews [version 1.20] 1996-12/08(Sun)
Xref: galaxy.trc.rwcp.or.jp fj.questions.unix:7865
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.questions.unix&nb=7865&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B;v8N%U%)%m!<(B

<65robl$nvf$1@cipher.yynet.tama.tokyo.jp>$B$N5-;v$K$*$$$F(B
yokota@yynet.tama.tokyo.jp$B$5$s$O=q$-$^$7$?!#(B

>> >> > $B;3eQ$H?=$7$^$9!#(Bbash-1.14.x $B$H(B bash-2.xx $B$NF|K\8l2=%Q%C%A$NCV$->l(B
>> >> > $B=j$r65$($F$/$@$5$$!#(Bftp.iis.u-tokyo.ac.jp $B$N(B fj.sources $B$rC5$7$^(B
>> >> > $B$7$?$,8E$$$b$N$7$+$"$j$^$;$s$G$7$?!#(B
>> >> 
>> >> $B@>Eg$5$s$N(B bash-1.14.1 $BMQ$N%Q%C%A$r(B bash-2.0x $B$G;H$($k$h$&$K$7$?$b(B
>> >> $B$N$G$7$?$i(B
>> >> <ftp://ftp.ipc.chiba-u.ac.jp/pub/pub.yamaga/bash/>
>> >> $B$K$"$j$^$9!#$b$759$7$1$l$P$*;n$72<$5$$!#(B
>> 
>> $B;d$b;n$5$;$F$$$?$@$-$^$7$?!#(B
>>   >> $B!y4{CN$N%P%0(B
>>   >>   $BF~NO9T$,J#?t9T$KEO$C$?$H$-$NF0:n$,IT0BDj(B
>> $B$H$$$&$N$G!"$A$g$C$H%=!<%9(B (lib/readline/display.c) $B$r$$$8$C$F$_$^$7$?!#(B

$B$9$_$^$;$s!#$9$C$4$$IT40A4$O%Q%C%AN.$7$F!#(B
$B$3$C$A$G8f4j$$$7$^$9!#(B
## $B$9$C$4$$CQ$:$+$7$$(B... $BK:$l$F$/$@$5$$!"@h$N%Q%C%A$O!#(B

--- display.c.~1~Sun Nov 30 20:21:26 1997
+++ display.cMon Dec  1 01:11:24 1997
@@ -318,6 +318,7 @@
   char *prompt_this_line;
 #ifdef KANJI
   int vispos;
+  int invcur;
   int invpos;
   int cursorline;
   int cursorcol;
@@ -589,20 +590,25 @@
 
   /* For each line in the buffer, do the updating display. */
 #ifdef KANJI
-vispos = invpos = 0;
+invcur = vispos = invpos = 0;
 for (nextinv = -1, linenum = 0; nextinv < out; linenum++)
 {
-  nextinv = adjust_position (invisible_line, invpos + screenwidth);
+  nextinv = adjust_position (invisible_line + invcur,
+     invpos + screenwidth) + invcur;
   update_line (linenum > _rl_vis_botlin ? "" : &visible_line[vispos],
-&invisible_line[invpos], linenum);
-  if ((c_pos >= invpos && c_pos < nextinv) || (nextinv == out && c_pos == out))
+&invisible_line[invcur+invpos], linenum, 0, 0, inv_botlin);
+  if ((c_pos >= (invcur+invpos) && c_pos < nextinv) || (nextinv == out && c_pos == out))
   {
 cursorline = linenum;
-cursorcol = c_pos - invpos;
-cursorlinepos = invpos;
+cursorcol = c_pos - (invcur+invpos);
+cursorlinepos = (invcur+invpos);
   }
   vispos = adjust_position (visible_line, vispos + screenwidth);
-  invpos = nextinv;
+  invpos = nextinv - invcur;
+  if (*(invisible_line + invcur + invpos) == '\0') {
+        invcur += invpos + 1;
+invpos = 0;
+  }
 }
 inv_botlin = linenum - 1;
 if (_rl_vis_botlin > inv_botlin)


$B$G$b!"$^$@JQ$+$b(B...
---
by $B$h$3$?(B http://www.yynet.tama.tokyo.jp/~yokota/
