diff options
-rw-r--r-- | ChangeLog.asciidoc | 1 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-color.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index f4ac57b81..8b816d345 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -15,6 +15,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 1.0 (under dev) +* core: fix color display of last color number + 1 (closes #101) * core: add bar item "buffer_short_name" (task #10882) * core: add option "send" in command /input (send text to a buffer) * core: add option "-buffer" in command /command (closes #67) diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index 1af361e01..4280a0493 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -383,9 +383,9 @@ gui_color_get_pair (int fg, int bg) return COLOR_WHITE; /* if invalid color, use default fg/bg */ - if (fg > gui_color_term_colors) + if (fg >= gui_color_term_colors) fg = -1; - if (bg > gui_color_term_colors) + if (bg >= gui_color_term_colors) bg = -1; /* compute index for gui_color_pairs with foreground and background */ |