From ce32e646922e02d8f85052eaf0c84e2915fa606f Mon Sep 17 00:00:00 2001 From: pagedown Date: Sat, 15 Jan 2022 20:19:12 +0800 Subject: [PATCH] Check the continued attribute when searching for prompt marks --- kitty/screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty/screen.c b/kitty/screen.c index 126c3381a..8b874638f 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -2684,7 +2684,7 @@ find_cmd_output(Screen *self, OutputOffset *oo, index_type start_y, unsigned int found_prompt = true; // change direction to downwards to find command output direction = 1; - } else if (line && line->attrs.prompt_kind == OUTPUT_START) { + } else if (line && line->attrs.prompt_kind == OUTPUT_START && !line->attrs.continued) { found_output = true; start = y1; found_prompt = true; // keep finding the first output start upwards @@ -2698,14 +2698,14 @@ find_cmd_output(Screen *self, OutputOffset *oo, index_type start_y, unsigned int // find upwards: find prompt after the output, and the first output while (y1 >= upward_limit) { line = checked_range_line(self, y1); - if (line && line->attrs.prompt_kind == PROMPT_START) { + if (line && line->attrs.prompt_kind == PROMPT_START && !line->attrs.continued) { if (direction == 0) { // find around: stop at prompt start start = y1 + 1; break; } found_next_prompt = true; end = y1; - } else if (line && line->attrs.prompt_kind == OUTPUT_START) { + } else if (line && line->attrs.prompt_kind == OUTPUT_START && !line->attrs.continued) { start = y1; break; }