diff options
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 4 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 30 | ||||
-rw-r--r-- | weechat/src/gui/curses/gui-curses-chat.c | 4 | ||||
-rw-r--r-- | weechat/src/gui/curses/gui-curses-window.c | 30 |
4 files changed, 60 insertions, 8 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index f0821cea1..7be398e7a 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -1165,11 +1165,7 @@ gui_chat_draw (t_gui_buffer *buffer, int erase) if (!ptr_line && ptr_win->scroll) { if (count == gui_chat_display_line (ptr_win, ptr_win->buffer->last_line, 0, 1)) - { ptr_win->scroll = 0; - ptr_win->start_line = NULL; - ptr_win->start_line_pos = 0; - } } if (!ptr_win->scroll && (ptr_win->start_line == ptr_win->buffer->lines)) diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index bdb8be4da..2e09a4fb0 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -533,6 +533,11 @@ gui_window_page_up (t_gui_window *window) (-1) * (window->win_chat_height - 1) : (-1) * ((window->win_chat_height - 1) * 2)); gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -569,6 +574,11 @@ gui_window_page_down (t_gui_window *window) } gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -591,6 +601,11 @@ gui_window_scroll_up (t_gui_window *window) (-1) * cfg_look_scroll_amount : (-1) * ( (window->win_chat_height - 1) + cfg_look_scroll_amount)); gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -628,6 +643,11 @@ gui_window_scroll_down (t_gui_window *window) } gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -647,6 +667,11 @@ gui_window_scroll_top (t_gui_window *window) window->start_line = window->buffer->lines; window->start_line_pos = 0; gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -666,6 +691,11 @@ gui_window_scroll_bottom (t_gui_window *window) window->start_line = NULL; window->start_line_pos = 0; gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } diff --git a/weechat/src/gui/curses/gui-curses-chat.c b/weechat/src/gui/curses/gui-curses-chat.c index f0821cea1..7be398e7a 100644 --- a/weechat/src/gui/curses/gui-curses-chat.c +++ b/weechat/src/gui/curses/gui-curses-chat.c @@ -1165,11 +1165,7 @@ gui_chat_draw (t_gui_buffer *buffer, int erase) if (!ptr_line && ptr_win->scroll) { if (count == gui_chat_display_line (ptr_win, ptr_win->buffer->last_line, 0, 1)) - { ptr_win->scroll = 0; - ptr_win->start_line = NULL; - ptr_win->start_line_pos = 0; - } } if (!ptr_win->scroll && (ptr_win->start_line == ptr_win->buffer->lines)) diff --git a/weechat/src/gui/curses/gui-curses-window.c b/weechat/src/gui/curses/gui-curses-window.c index bdb8be4da..2e09a4fb0 100644 --- a/weechat/src/gui/curses/gui-curses-window.c +++ b/weechat/src/gui/curses/gui-curses-window.c @@ -533,6 +533,11 @@ gui_window_page_up (t_gui_window *window) (-1) * (window->win_chat_height - 1) : (-1) * ((window->win_chat_height - 1) * 2)); gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -569,6 +574,11 @@ gui_window_page_down (t_gui_window *window) } gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -591,6 +601,11 @@ gui_window_scroll_up (t_gui_window *window) (-1) * cfg_look_scroll_amount : (-1) * ( (window->win_chat_height - 1) + cfg_look_scroll_amount)); gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -628,6 +643,11 @@ gui_window_scroll_down (t_gui_window *window) } gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -647,6 +667,11 @@ gui_window_scroll_top (t_gui_window *window) window->start_line = window->buffer->lines; window->start_line_pos = 0; gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } @@ -666,6 +691,11 @@ gui_window_scroll_bottom (t_gui_window *window) window->start_line = NULL; window->start_line_pos = 0; gui_chat_draw (window->buffer, 0); + if (!window->scroll) + { + window->start_line = NULL; + window->start_line_pos = 0; + } gui_status_draw (window->buffer, 0); } } |