Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Make clrtoeol match the ncurses behaviour wher...



details:   https://anonhg.NetBSD.org/src/rev/3b15dea05dd7
branches:  trunk
changeset: 366062:3b15dea05dd7
user:      blymn <blymn%NetBSD.org@localhost>
date:      Thu May 12 22:25:38 2022 +0000

description:
Make clrtoeol match the ncurses behaviour where it seems to make the
rest of line foreground.  This fixes a display oddity in mutt.

diffstat:

 lib/libcurses/clrtoeol.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r bc30a55cce15 -r 3b15dea05dd7 lib/libcurses/clrtoeol.c
--- a/lib/libcurses/clrtoeol.c  Thu May 12 22:08:55 2022 +0000
+++ b/lib/libcurses/clrtoeol.c  Thu May 12 22:25:38 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clrtoeol.c,v 1.34 2022/04/12 07:03:04 blymn Exp $      */
+/*     $NetBSD: clrtoeol.c,v 1.35 2022/05/12 22:25:38 blymn Exp $      */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: clrtoeol.c,v 1.34 2022/04/12 07:03:04 blymn Exp $");
+__RCSID("$NetBSD: clrtoeol.c,v 1.35 2022/05/12 22:25:38 blymn Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -91,6 +91,12 @@
        maxx = &win->alines[y]->line[x];
 
        for (sp = maxx; sp < end; sp++) {
+               /*
+                * It looks like ncurses makes the rest of line foreground
+                * when it is cleared - this doesn't seem right but it
+                * makes applicatins look right.
+                */
+               sp->cflags &= ~CA_BACKGROUND;
                if (!(__NEED_ERASE(sp, bch, battr)))
                        continue;
 



Home | Main Index | Thread Index | Old Index