NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: install/56467: sysinst output no longer scrolls correctly
The following reply was made to PR install/56467; it has been noted by GNATS.
From: Julian Coleman <jdc%coris.org.uk@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: blymn%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
Kimmo Suominen <kim%netbsd.org@localhost>, RVP <rvp%sdf.org@localhost>
Subject: Re: install/56467: sysinst output no longer scrolls correctly
Date: Fri, 8 Sep 2023 13:47:56 +0200
--YYpKTFD0O9xRP6OX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
> > I think this patch is OK - we set win->curx = 0 in scroll(). However, I
> > wonder if we should add if (!__NONL), as is done there [*]?
> Ah, I've lost all context for this, but, certainly there's an issue a few
> lines above that:
>
> https://nxr.netbsd.org/xref/src/lib/libcurses/tty.c#116
>
> It should be `screen->outfd' as per the comment just above.
Good point! Something like the attached should be OK.
Regards,
Julian
--YYpKTFD0O9xRP6OX
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="pr56467-libcurses.patch"
Index: src/lib/libcurses/addbytes.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/addbytes.c,v
retrieving revision 1.68
diff -u -r1.68 addbytes.c
--- src/lib/libcurses/addbytes.c 20 Dec 2022 04:57:01 -0000 1.68
+++ src/lib/libcurses/addbytes.c 6 Sep 2023 20:31:12 -0000
@@ -585,6 +585,8 @@
__CTRACE(__CTRACE_INPUT,
"_cursesi_addwchar: do a scroll\n");
scroll(win);
+ if (!__NONL)
+ *x = 0;
}
newx = win->maxx - 1 + win->ch_off;
if (newx > *(*lnp)->lastchp)
Index: src/lib/libcurses/tty.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/tty.c,v
retrieving revision 1.49
diff -u -r1.49 tty.c
--- src/lib/libcurses/tty.c 6 Sep 2021 07:03:50 -0000 1.49
+++ src/lib/libcurses/tty.c 6 Sep 2023 20:31:12 -0000
@@ -113,7 +113,7 @@
if (tcgetattr(fileno(screen->infd), &screen->orig_termios)) {
/* if the input fd is not a tty try the output */
- if (tcgetattr(fileno(screen->infd), &screen->orig_termios)) {
+ if (tcgetattr(fileno(screen->outfd), &screen->orig_termios)) {
/* not a tty ... we will disable tty related stuff */
screen->notty = TRUE;
__GT = 0;
--YYpKTFD0O9xRP6OX--
Home |
Main Index |
Thread Index |
Old Index