diff --git a/docs/changelog.rst b/docs/changelog.rst index 520686f71..e926475ca 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -93,8 +93,8 @@ Detailed list of changes - Fix a regression in the previous release that broke strikethrough (:disc:`4632`) -- A new action :ac:`scroll_prompt_to_bottom` to moves the non-empty prompt lines - to the bottom. (:pull:`4634`) +- A new action :ac:`scroll_prompt_to_bottom` to move the current prompt + to the bottom, filling in the window from the scrollback (:pull:`4634`) 0.24.2 [2022-02-03] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/screen.c b/kitty/screen.c index 70328f7ea..bab959ce5 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -3728,7 +3728,7 @@ scroll_prompt_to_bottom(Screen *self, PyObject *args UNUSED) { // not before prompt or cursor line while (y > limit_y) { Line *line = checked_range_line(self, y); - if (line_length(line)) break; + if (!line || line_length(line)) break; y--; } // don't scroll back beyond the history buffer range diff --git a/kitty/window.py b/kitty/window.py index 345530729..b58712a79 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -1241,7 +1241,7 @@ class Window: if self.screen.is_main_linebuf(): self.screen.scroll_to_prompt(num_of_prompts) - @ac('sc', 'Scroll prompt to the bottom of the screen') + @ac('sc', 'Scroll prompt to the bottom of the screen, filling in extra lines form the scrollback buffer') def scroll_prompt_to_bottom(self) -> None: self.screen.scroll_prompt_to_bottom()