From d81d5c09d146a0a26ead47bf7334c917ebc08189 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 22 Aug 2012 10:14:24 +0200 Subject: [PATCH] core: fix infinite loop in display when chat area has width of 1 with a bar displayed on the right (nicklist by default) (bug #37089) --- ChangeLog | 4 +++- src/gui/curses/gui-curses-chat.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82c331e90..52eb2e2e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.9-dev, 2012-08-17 +v0.3.9-dev, 2012-08-22 Version 0.3.9 (under dev!) -------------------------- +* core: fix infinite loop in display when chat area has width of 1 with + a bar displayed on the right (nicklist by default) (bug #37089) * core: fix display of "bar more down" char when text is truncated by size_max in bars with vertical filling (bug #37054) * core: fix color of long lines (displayed on more than one line on screen) diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index b3bc4b96a..f911e57ad 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -52,7 +52,8 @@ int gui_chat_get_real_width (struct t_gui_window *window) { - if (window->win_chat_x + window->win_chat_width < gui_window_get_width ()) + if ((window->win_chat_width > 1) + && (window->win_chat_x + window->win_chat_width < gui_window_get_width ())) return window->win_chat_width - 1; else return window->win_chat_width;