mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* color.c (mc_init_pair) [HAVE_SLANG]: Pass "default", not NULL
to SLtt_set_color() - it fixes transparency with the latest versions of S-Lang. Treat foreground like background.
This commit is contained in:
parent
759125c6c7
commit
8ba045461d
@ -1,3 +1,9 @@
|
||||
2002-11-28 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* color.c (mc_init_pair) [HAVE_SLANG]: Pass "default", not NULL
|
||||
to SLtt_set_color() - it fixes transparency with the latest
|
||||
versions of S-Lang. Treat foreground like background.
|
||||
|
||||
2002-11-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* main.c: Eliminate finish_program variable - mc can now exit
|
||||
|
11
src/color.c
11
src/color.c
@ -121,7 +121,7 @@ static struct color_table_s const color_table [] = {
|
||||
{ "brightcyan", COLOR_CYAN | A_BOLD },
|
||||
{ "lightgray", COLOR_WHITE },
|
||||
{ "white", COLOR_WHITE | A_BOLD },
|
||||
{ "default", 0 } /* hack for transparent background */
|
||||
{ "default", 0 } /* default color of the terminal */
|
||||
};
|
||||
|
||||
#ifdef HAVE_SLANG
|
||||
@ -321,10 +321,11 @@ static struct colors_avail {
|
||||
void
|
||||
mc_init_pair (int index, CTYPE foreground, CTYPE background)
|
||||
{
|
||||
/* hack for transparent background for Eterm, rxvt or else */
|
||||
if (background && !strcmp (background, "default"))
|
||||
background = NULL;
|
||||
/* if foreground is default, I guess we should use normal fore-color. */
|
||||
if (!background)
|
||||
background = "default";
|
||||
|
||||
if (!foreground)
|
||||
foreground = "default";
|
||||
|
||||
SLtt_set_color (index, "", foreground, background);
|
||||
if (index > max_index)
|
||||
|
Loading…
Reference in New Issue
Block a user