summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-08-22 10:14:24 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-08-22 10:14:24 +0200
commitd81d5c09d146a0a26ead47bf7334c917ebc08189 (patch)
treeca2f5f756770ce560d35ddd498c7097cc9696066
parentd26f00b391b2aab06d20d26dc53e75aa1f9c8021 (diff)
downloadweechat-d81d5c09d146a0a26ead47bf7334c917ebc08189.zip
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)
-rw-r--r--ChangeLog4
-rw-r--r--src/gui/curses/gui-curses-chat.c3
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 <flashcode@flashtux.org>
-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;