[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ncursesw bug in refreshing wide character (with patch)
From: |
Eungkyu Song |
Subject: |
Re: Ncursesw bug in refreshing wide character (with patch) |
Date: |
Tue, 11 Jan 2005 12:22:44 +0900 |
User-agent: |
Mutt/1.5.6+20040907i |
On Sat, Jan 08, 2005 at 01:54:40PM -0500, Thomas Dickey wrote:
> From: Thomas Dickey <address@hidden>
> Date: Sat, 8 Jan 2005 13:54:40 -0500
> Subject: Re: Ncursesw bug in refreshing wide character (with patch)
> To: Eungkyu Song <address@hidden>
> Cc: Ncurses Mailing List <address@hidden>
> X-Bogosity: Ham, tests=bogofilter, spamicity=0.413454, version=0.93.1
>
> It seems you are talking about this chunk (adapted). There are three pieces
> in your patch. But I'm not sure how to test it:
>
> ===================================================================
> RCS file: tty/RCS/tty_update.c,v
> retrieving revision 1.213
> diff -u -r1.213 tty/tty_update.c
> --- tty/tty_update.c 2005/01/02 01:33:32 1.213
> +++ tty/tty_update.c 2005/01/08 18:50:22
> @@ -1297,11 +1297,19 @@
>
> if (oLastChar < nLastChar) {
> int m = max(nLastNonblank, oLastNonblank);
> - GoTo(lineno, n + 1);
> if (InsCharCost(nLastChar - oLastChar)
> > (m - n)) {
> + GoTo(lineno, n + 1);
> PutRange(oldLine, newLine, lineno, n + 1, m);
> } else {
> +#if USE_WIDEC_SUPPORT
> + if (isWidecExt(newLine[n + 1])) {
> + GoTo(lineno, n);
> + PutRange(oldLine, newLine, lineno, n, n + 1);
> + n++;
> + }
> +#endif
> + GoTo(lineno, n + 1);
> InsStr(&newLine[n + 1], nLastChar - oLastChar);
> }
> } else if (oLastChar > nLastChar) {
>
This patch work correctly.
Thank you very much.
> If that is what you are talking about, this is simpler:
>
> ===================================================================
> RCS file: tty/RCS/tty_update.c,v
> retrieving revision 1.213
> diff -u -r1.213 tty/tty_update.c
> --- tty/tty_update.c 2005/01/02 01:33:32 1.213
> +++ tty/tty_update.c 2005/01/08 18:52:53
> @@ -1298,8 +1298,10 @@
> if (oLastChar < nLastChar) {
> int m = max(nLastNonblank, oLastNonblank);
> GoTo(lineno, n + 1);
> - if (InsCharCost(nLastChar - oLastChar)
> - > (m - n)) {
> + if (InsCharCost(nLastChar - oLastChar) > (m - n)
> +#if USE_WIDEC_SUPPORT
> + || isWidecExt(newLine[n + 1])
> + ) {
> PutRange(oldLine, newLine, lineno, n + 1, m);
> } else {
> InsStr(&newLine[n + 1], nLastChar - oLastChar);
This patch has no #endif line :(
Anyway first patch is perfect.
Simple program is attached to test this patch.
You may need Korean (EUC-KR) locale, terminal and font.
LANG=ko_KR.EUC-KR will work.
--
___ _ Division of CS, Dept. of EECS in KAIST
| __| _ _ _ __ _| |___ _ _ _ Member of SPARCS
| _| || | ' `/ _` | / / || | || | http://sparcs.kaist.ac.kr/~eungkyu/
|___`_,_|_||_`__, |_`_``_, |`_,_| @sparcs.kaist.ac.kr
|___/ |__/
ncurseswbug.tar.gz
Description: Binary data