1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:43:13 +02:00

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.
This commit is contained in:
Sebastien Helleu
2014-01-27 18:32:32 +01:00
parent b8ffa87b5c
commit 1b2f4108fd
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -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;
}