summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-04-26 12:39:35 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-04-26 12:39:35 +0200
commit51f836feb81e8021dda0b67d4efcd56d635f8f5d (patch)
treea36bc229b5c3beb233a2f21a1fbe000febf8d42d /src
parent4ea7fe26272a0b08c5de2f025e85210c6f86d141 (diff)
downloadweechat-51f836feb81e8021dda0b67d4efcd56d635f8f5d.zip
core: fix scroll on buffers with free content
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-window.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c
index 55d667997..f8deb1af6 100644
--- a/src/gui/gui-window.c
+++ b/src/gui/gui-window.c
@@ -800,7 +800,8 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
window->scroll->start_line : window->buffer->lines->last_line;
while (ptr_line
&& (!gui_line_is_displayed (ptr_line)
- || (ptr_line->data->date == 0)))
+ || ((window->buffer->type == GUI_BUFFER_TYPE_FORMATTED)
+ && (ptr_line->data->date == 0))))
{
ptr_line = ptr_line->prev_line;
}
@@ -811,7 +812,8 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
window->scroll->start_line : window->buffer->lines->first_line;
while (ptr_line
&& (!gui_line_is_displayed (ptr_line)
- || (ptr_line->data->date == 0)))
+ || ((window->buffer->type == GUI_BUFFER_TYPE_FORMATTED)
+ && (ptr_line->data->date == 0))))
{
ptr_line = ptr_line->next_line;
}
@@ -829,7 +831,9 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
ptr_line = (direction < 0) ?
gui_line_get_prev_displayed (ptr_line) : gui_line_get_next_displayed (ptr_line);
- if (ptr_line && (ptr_line->data->date != 0))
+ if (ptr_line
+ && ((window->buffer->type != GUI_BUFFER_TYPE_FORMATTED)
+ || (ptr_line->data->date != 0)))
{
if (time_letter == ' ')
{