summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-05-14 18:21:42 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-05-14 18:21:42 +0200
commit40a14b4574912b03ab59bae1d8797f320395c9c7 (patch)
tree247e4385d2aec888772bc806db289a7883080517 /src
parent4f4f32b9edf5b575bf28d22d753a9d7689e80ff0 (diff)
downloadweechat-40a14b4574912b03ab59bae1d8797f320395c9c7.zip
core: force buffer property "time_for_each_line" to 0 for buffers with free content (closes #1485)
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-buffer.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 41a6791e0..b84dcea85 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1376,8 +1376,19 @@ gui_buffer_set_type (struct t_gui_buffer *buffer, enum t_gui_buffer_type type)
gui_line_free_all (buffer);
buffer->type = type;
- if (type == GUI_BUFFER_TYPE_FREE)
- buffer->clear = 0;
+
+ switch (type)
+ {
+ case GUI_BUFFER_TYPE_FORMATTED:
+ buffer->time_for_each_line = 1;
+ break;
+ case GUI_BUFFER_TYPE_FREE:
+ buffer->clear = 0;
+ buffer->time_for_each_line = 0;
+ break;
+ case GUI_BUFFER_NUM_TYPES:
+ break;
+ }
gui_buffer_ask_chat_refresh (buffer, 2);