NetBSD-Bugs archive

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

Re: lib/41257: curses: getyx + wmove violates least astonishment past end-of-line



The following reply was made to PR lib/41257; it has been noted by GNATS.

From: Jed Davis <jld%panix.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/41257: curses: getyx + wmove violates least astonishment
        past end-of-line
Date: Thu, 7 May 2009 20:55:56 -0400

 On Tue, Apr 21, 2009 at 01:45:03PM +0000, Brett Lymn wrote:
 >  --- addbytes.c      4 Jul 2008 16:52:10 -0000       1.34
 >  +++ addbytes.c      21 Apr 2009 13:36:36 -0000
 >  @@ -540,7 +540,7 @@
 >              /* Mark as "continuation" cell */
 >              tp->attr |= __WCWIDTH;
 >      }
 >  -   if (*x == win->maxx) {
 >  +   if (*x >= win->maxx - 1) {
 >              (*lnp)->flags |= __ISPASTEOL;
 >              newx = win->maxx - 1 + win->ch_off;
 >              if (newx > *(*lnp)->lastchp)
 
 I've finally gotten a chance to test this, and it seems to be not quite
 right -- it causes the wrapping to occur one character too soon, so the
 last column of the terminal can't be written to.
 
 --Jed
 


Home | Main Index | Thread Index | Old Index