summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/curses/gui-curses-window.c6
-rw-r--r--src/gui/gui-window.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index 71bf2b1d9..6321c77d0 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -533,6 +533,12 @@ gui_window_switch_to_buffer (struct t_gui_window *window,
ptr_bar_win->bar->bar_refresh_needed = 1;
}
+ if (window->buffer->type == GUI_BUFFER_TYPE_FREE)
+ {
+ window->scroll = 0;
+ window->scroll_lines_after = 0;
+ }
+
window->refresh_needed = 1;
hook_signal_send ("buffer_switch",
diff --git a/src/gui/gui-window.h b/src/gui/gui-window.h
index db17b29b0..aa215d970 100644
--- a/src/gui/gui-window.h
+++ b/src/gui/gui-window.h
@@ -64,7 +64,7 @@ struct t_gui_window
int scroll_lines_after; /* number of lines after last line */
/* displayed (with scrolling) */
int scroll_reset_allowed; /* reset scroll allowed (when using */
- /* keys like page_up/down, end, .. */
+ /* keys like page_up/down, end, ..) */
struct t_gui_window_tree *ptr_tree;/* pointer to leaf in windows tree */
struct t_gui_window *prev_window; /* link to previous window */