curses: correctly pass the color pair to setcchar()
authorMatthew Kilgore <mattkilgore12@gmail.com>
Fri, 4 Oct 2019 03:53:38 +0000 (23:53 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 18 Oct 2019 08:39:12 +0000 (10:39 +0200)
commit30f5a9dd7a6252d31fb73ab5193f3be1be7766c7
treee0ba4616343af4d351d18730ce19ca98cd61bbdd
parentcd54ea456dbb2c704e8eb88c8ef4d3316aec133b
curses: correctly pass the color pair to setcchar()

The current code does not correctly pass the color pair information to
setcchar(), it instead always passes zero. This results in the curses
output always being in white on black.

This patch fixes this by using PAIR_NUMBER() to retrieve the color pair
number from the chtype value, and then passes that value as an argument
to setcchar().

Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id: 20191004035338.25601-3-mattkilgore12@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/curses.c