From 80d7da090231ad864eb3381d4a461bf104358e1f Mon Sep 17 00:00:00 2001 From: Arvin Verain Date: Tue, 25 Feb 2025 19:01:17 +0800 Subject: [PATCH] fix: Edge case when paging from a line within prompt When PROMPT_START is already past scrollback and can't be found upwards, set the proper values depending on if the search is over or deferred downwards. --- kitty/screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/screen.c b/kitty/screen.c index e4a44da5e..8363b2f8f 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -4122,7 +4122,8 @@ find_cmd_output(Screen *self, OutputOffset *oo, index_type start_screen_y, unsig } if (y1 < upward_limit) { oo->reached_upper_limit = true; - found_output = true; start = upward_limit; + found_output = direction != 0; start = upward_limit; + found_prompt = direction != 0; } }