summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-01-27 18:32:32 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-01-27 18:32:32 +0100
commit1b2f4108fde1ace64917406fb7df2013533fc0a1 (patch)
treec7b18488a07bdaa3be3c885fc17af024f0c91f0b /src/gui
parentb8ffa87b5c23a855097e650266dc3e610d11e175 (diff)
downloadweechat-1b2f4108fde1ace64917406fb7df2013533fc0a1.zip
core: fix display of read marker when all buffers line are unread
The bug is when all buffer lines are unread (so "last_read_line" pointer is NULL), and that the option weechat.look.read_marker_always_show is on. The read marker was displayed at bottom after switch to the buffer. Thanks to Nils Görs.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-curses-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index b728c851e..2a640083c 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -1302,7 +1302,9 @@ gui_window_switch_to_buffer (struct t_gui_window *window,
}
if (CONFIG_BOOLEAN(config_look_read_marker_always_show)
- && set_last_read && !window->buffer->lines->last_read_line)
+ && set_last_read
+ && !window->buffer->lines->last_read_line
+ && !window->buffer->lines->first_line_not_read)
{
window->buffer->lines->last_read_line = window->buffer->lines->last_line;
}