summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-display.c4
-rw-r--r--src/gui/gui-common.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index 1fa32908e..4a32bfb50 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -1673,6 +1673,7 @@ gui_window_split_horiz (t_gui_window *window)
/* assign same buffer for new window (top window) */
new_window->buffer = window->buffer;
+ new_window->buffer->num_displayed++;
gui_switch_to_buffer (window, window->buffer);
@@ -1705,6 +1706,7 @@ gui_window_split_vertic (t_gui_window *window)
/* assign same buffer for new window (right window) */
new_window->buffer = window->buffer;
+ new_window->buffer->num_displayed++;
gui_switch_to_buffer (window, window->buffer);
@@ -2227,7 +2229,7 @@ gui_add_message (t_gui_buffer *buffer, int type, int color, char *message)
if (pos)
{
pos[0] = '\n';
- if ((buffer->num_displayed > 0) && (gui_current_window->sub_lines == 0))
+ if ((buffer->num_displayed > 0) /*&& (gui_current_window->sub_lines == 0)*/)
{
/*if ((buffer->window->win_chat_cursor_y
+ gui_get_line_num_splits (buffer, buffer->last_line)) >
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index 28c94e44c..f64d79bea 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -337,6 +337,9 @@ gui_infobar_printf (int time_displayed, int color, char *message, ...)
void
gui_window_free (t_gui_window *window)
{
+ if (window->buffer->num_displayed > 0)
+ window->buffer->num_displayed--;
+
/* remove window from windows list */
if (window->prev_window)
window->prev_window->next_window = window->next_window;