summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSimmo Saan <simmo.saan@gmail.com>2019-05-02 21:06:42 +0300
committerSimmo Saan <simmo.saan@gmail.com>2019-05-02 21:06:42 +0300
commitbf1462d7a14aa47b2b36b6569cd0472cee5002ad (patch)
treeeec32b0c86dbbabecc542fad912db277a8fd5efd /src/gui
parentf5f6cf028cee227533aec86d1f4d189f6769f10c (diff)
downloadweechat-bf1462d7a14aa47b2b36b6569cd0472cee5002ad.zip
gui: change command line option "-c" color pairs table to match (issue #1343)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-curses-color.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c
index a2e5e21f8..f54a0bf35 100644
--- a/src/gui/curses/gui-curses-color.c
+++ b/src/gui/curses/gui-curses-color.c
@@ -700,7 +700,7 @@ gui_color_init_pairs_weechat ()
void
gui_color_display_terminal_colors ()
{
- int lines, line, col, color;
+ int lines, columns, line, col, color;
char str_line[1024], str_color[64];
initscr ();
@@ -728,13 +728,14 @@ gui_color_display_terminal_colors ()
printf ("%s\n", _("Default colors:"));
printf ("------------------------------------------------------------"
"--------------------\n");
- lines = (gui_color_term_colors < 16) ? gui_color_term_colors : 16;
+ columns = 16;
+ lines = (gui_color_term_colors - 1) / columns + 1;
for (line = 0; line < lines; line++)
{
str_line[0] = '\0';
- for (col = 0; col < 16; col++)
+ for (col = 0; col < columns; col++)
{
- color = (col * 16) + line;
+ color = line * columns + col;
if (color < gui_color_term_colors)
{
snprintf (str_color, sizeof (str_color),