diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-02-02 13:53:38 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-02-02 13:53:38 +0100 |
commit | 323290c83ef58904bf08d2447a20ab55659f778b (patch) | |
tree | b927c8af5453af013cc3f073eb64b9f431a5380c /src/gui/curses | |
parent | 7e12f8596a501323c8e9f889ed1c2f4080e8cd0e (diff) | |
download | weechat-323290c83ef58904bf08d2447a20ab55659f778b.zip |
Fix crash when read marker is moved before first line displayed (when first line of buffer is removed)
Diffstat (limited to 'src/gui/curses')
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 91d8c87a0..aed643dca 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -470,9 +470,15 @@ gui_window_switch_to_buffer (struct t_gui_window *window, if (set_last_read) { if (window->buffer->num_displayed == 0) + { window->buffer->last_read_line = window->buffer->last_line; + window->buffer->first_line_not_read = 0; + } if (buffer->last_read_line == buffer->last_line) + { buffer->last_read_line = NULL; + buffer->first_line_not_read = 0; + } } } |