From 5a068f7578423c1f37556da0a8ffca79ec63fe03 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 2 Dec 2016 14:31:14 +0530 Subject: [PATCH] Do not scroll when using the alternate screen --- kitty/window.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/kitty/window.py b/kitty/window.py index c54f5a785..d679428e5 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -256,28 +256,34 @@ class Window: tm.queue_ui_action(tm.glfw_window.set_clipboard_string, text) def scroll_line_up(self): - self.char_grid.scroll('line', True) - glfw_post_empty_event() + if self.screen.is_main_linebuf(): + self.char_grid.scroll('line', True) + glfw_post_empty_event() def scroll_line_down(self): - self.char_grid.scroll('line', False) - glfw_post_empty_event() + if self.screen.is_main_linebuf(): + self.char_grid.scroll('line', False) + glfw_post_empty_event() def scroll_page_up(self): - self.char_grid.scroll('page', True) - glfw_post_empty_event() + if self.screen.is_main_linebuf(): + self.char_grid.scroll('page', True) + glfw_post_empty_event() def scroll_page_down(self): - self.char_grid.scroll('page', False) - glfw_post_empty_event() + if self.screen.is_main_linebuf(): + self.char_grid.scroll('page', False) + glfw_post_empty_event() def scroll_home(self): - self.char_grid.scroll('full', True) - glfw_post_empty_event() + if self.screen.is_main_linebuf(): + self.char_grid.scroll('full', True) + glfw_post_empty_event() def scroll_end(self): - self.char_grid.scroll('full', False) - glfw_post_empty_event() + if self.screen.is_main_linebuf(): + self.char_grid.scroll('full', False) + glfw_post_empty_event() # }}} def dump_commands(self, *a): # {{{