summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-08-11 18:49:22 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-08-11 18:49:22 +0200
commitcf27302dacf6c9f1d1d537e3d7a6fa5646d0523e (patch)
tree1ce44f97807413577c9acb04defc74769359e7d3 /src/gui
parentda8b7a85bb9550d01a1b77a4d90c34da37b96b21 (diff)
downloadweechat-cf27302dacf6c9f1d1d537e3d7a6fa5646d0523e.zip
core: add terminal and color info in output of /debug color
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-curses-color.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c
index 9a3ccf4cc..5a5b50c10 100644
--- a/src/gui/curses/gui-curses-color.c
+++ b/src/gui/curses/gui-curses-color.c
@@ -757,12 +757,9 @@ gui_color_display_terminal_colors ()
refresh ();
endwin ();
}
+ gui_color_info_term_colors (str_line, sizeof (str_line));
printf ("\n");
- printf ("%s $TERM=%s COLORS: %d, COLOR_PAIRS: %d, "
- "can_change_color: %s\n",
- _("Terminal infos:"),
- getenv ("TERM"), gui_color_term_colors, gui_color_term_color_pairs,
- (gui_color_term_can_change_color) ? "yes" : "no");
+ printf ("%s %s\n", _("Terminal infos:"), str_line);
if (gui_color_term_colors == 0)
{
printf ("%s\n", _("No color support in terminal."));
@@ -1571,9 +1568,13 @@ gui_color_alloc ()
void
gui_color_dump ()
{
+ char str_line[1024];
int fg, bg, index, used;
+ gui_color_info_term_colors (str_line, sizeof (str_line));
+
gui_chat_printf (NULL, "");
+ gui_chat_printf (NULL, "%s", str_line);
gui_chat_printf (NULL,
_("WeeChat colors (in use: %d, left: %d):"),
gui_color_pairs_used,