bug-ncurses
[Top][All Lists]
Advanced

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

Re: Strange ncurses/lynx interaction


From: Thomas Dickey
Subject: Re: Strange ncurses/lynx interaction
Date: Thu, 23 May 2002 20:56:37 -0400
User-agent: Mutt/1.2.5i

On Thu, May 23, 2002 at 12:34:35AM -0700, Mike Castle wrote:
> In article <address@hidden>,
> Mike Castle  <address@hidden> wrote:
> >I'm going to back out the last ncurses patch and try again.
> 
> Dropped back to 20020511 and the problem went away.

I think the following is an improvement (being late in the week, I'll probably
roll it into Saturday's patch):

# ------------------------------------------------------------------------------
# NEWS                   |    4 ++++
# ncurses/base/lib_pad.c |   33 +++++++++++++++------------------
# 2 files changed, 19 insertions(+), 18 deletions(-)
# ------------------------------------------------------------------------------
Index: NEWS
Prereq:  1.686 
--- ncurses-5.2-20020518+/NEWS  Sat May 18 17:26:10 2002
+++ ncurses-5.2-20020523/NEWS   Thu May 23 19:41:44 2002
@@ -6,6 +6,10 @@
 Changes through 1.9.9e are recorded by Zeyd M. Ben-Halim.
 Changes since 1.9.9e are recorded by Thomas Dickey.
 
+20020523
+       + correct and simplify logic for lib_pad.c change in 20020518 (reported
+         by Mike Castle).
+
 20020518
        + fix lib_pad.c for case of drawing a double-width character which
          falls off the left margin of the pad (patch by Kriang Lerdsuwanakij
Index: ncurses/base/lib_pad.c
Prereq:  1.36 
--- ncurses-5.2-20020518+/ncurses/base/lib_pad.c        Sat May 18 17:28:44 2002
+++ ncurses-5.2-20020523/ncurses/base/lib_pad.c Thu May 23 19:39:26 2002
@@ -193,24 +193,21 @@
         i++, m++) {
        register struct ldat *nline = &newscr->_line[m];
        register struct ldat *oline = &win->_line[i];
-       NCURSES_CH_T ch;
-
-       /*
-        * Special case for leftmost character of the displayed area.
-        * Only half of a double-width character may be visible.
-        */
-       ch = oline->text[pmincol];
-       if_WIDEC(isnac(ch)) {
-           SetChar(ch, L(' '), AttrOf(oline->text[pmincol - 1]));
-       }
-       if (!CharEq(ch, nline->text[smincol])) {
-           nline->text[smincol] = ch;
-           CHANGED_CELL(nline, smincol);
-       }
-
-       for (j = pmincol + 1, n = smincol + 1; j <= pmaxcol; j++, n++) {
-           if (!CharEq(oline->text[j], nline->text[n])) {
-               nline->text[n] = oline->text[j];
+       for (j = pmincol, n = smincol; j <= pmaxcol; j++, n++) {
+           NCURSES_CH_T ch = oline->text[j];
+#if USE_WIDEC_SUPPORT
+           /*
+            * Special case for leftmost character of the displayed area.
+            * Only half of a double-width character may be visible.
+            */
+           if (j == pmincol
+            && j > 0
+            && isnac(ch)) {
+               SetChar(ch, L(' '), AttrOf(oline->text[j - 1]));
+           }
+#endif
+           if (!CharEq(ch, nline->text[n])) {
+               nline->text[n] = ch;
                CHANGED_CELL(nline, n);
            }
        }

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]