diff --git a/kitty/keys.c b/kitty/keys.c index a4520a80e..87a59c198 100644 --- a/kitty/keys.c +++ b/kitty/keys.c @@ -146,9 +146,6 @@ on_key_input(int key, int scancode, int action, int mods) { Window *w = active_window(); if (!w) return; Screen *screen = w->render_data.screen; - if (screen->scrolled_by && action == GLFW_PRESS && !is_modifier_key(key)) { - screen_history_scroll(screen, SCROLL_FULL, false); // scroll back to bottom - } int lkey = get_localized_key(key, scancode); if (action == GLFW_PRESS || action == GLFW_REPEAT) { uint16_t qkey = key_map[lkey]; @@ -168,6 +165,9 @@ on_key_input(int key, int scancode, int action, int mods) { } } } + if (screen->scrolled_by && action == GLFW_PRESS && !is_modifier_key(key)) { + screen_history_scroll(screen, SCROLL_FULL, false); // scroll back to bottom + } if ( action == GLFW_PRESS || (action == GLFW_REPEAT && screen->modes.mDECARM) || diff --git a/kitty/window.py b/kitty/window.py index 064e6a21c..a4d34bb07 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -249,30 +249,24 @@ class Window: def scroll_line_up(self): if self.screen.is_main_linebuf(): self.screen.scroll(SCROLL_LINE, True) - glfw_post_empty_event() def scroll_line_down(self): if self.screen.is_main_linebuf(): self.screen.scroll(SCROLL_LINE, False) - glfw_post_empty_event() def scroll_page_up(self): if self.screen.is_main_linebuf(): self.screen.scroll(SCROLL_PAGE, True) - glfw_post_empty_event() def scroll_page_down(self): if self.screen.is_main_linebuf(): self.screen.scroll(SCROLL_PAGE, False) - glfw_post_empty_event() def scroll_home(self): if self.screen.is_main_linebuf(): self.screen.scroll(SCROLL_FULL, True) - glfw_post_empty_event() def scroll_end(self): if self.screen.is_main_linebuf(): self.screen.scroll(SCROLL_FULL, False) - glfw_post_empty_event() # }}}