diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index ec0633567..350c0adbc 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -64,10 +64,19 @@ gui_chat_get_real_width (struct t_gui_window *window) int gui_chat_marker_for_line (struct t_gui_buffer *buffer, struct t_gui_line *line) { + struct t_gui_line *last_read_line; + /* marker is not set for buffer? */ if (!buffer->last_read_line) return 0; + last_read_line = buffer->last_read_line; + if (!last_read_line->displayed) + last_read_line = gui_chat_get_prev_line_displayed (last_read_line); + + if (!last_read_line) + return 0; + /* marker is disabled in config? */ if ((CONFIG_INTEGER(config_look_read_marker) != CONFIG_LOOK_READ_MARKER_LINE) && (CONFIG_INTEGER(config_look_read_marker) != CONFIG_LOOK_READ_MARKER_DOTTED_LINE)) @@ -75,7 +84,7 @@ gui_chat_marker_for_line (struct t_gui_buffer *buffer, struct t_gui_line *line) while (line) { - if (buffer->last_read_line == line) + if (last_read_line == line) return 1; if (line->displayed) |