fix: Edge case when paging from a line within output
When OUTPUT_START is already past scrollback and can't be found upwards, properly handle the first prompt encountered to capture the correct command output to be paged.
This commit is contained in:
parent
80d7da0902
commit
59f134d511
1 changed files with 7 additions and 2 deletions
|
|
@ -4133,8 +4133,13 @@ find_cmd_output(Screen *self, OutputOffset *oo, index_type start_screen_y, unsig
|
|||
if (on_screen_only && !found_output && y2 > screen_limit) break;
|
||||
line = checked_range_line(self, y2);
|
||||
if (line && line->attrs.prompt_kind == PROMPT_START) {
|
||||
if (!found_prompt) found_prompt = true;
|
||||
else if (found_prompt && !found_output) {
|
||||
if (!found_prompt) {
|
||||
if (direction == 0) {
|
||||
found_next_prompt = true; end = y2;
|
||||
break;
|
||||
}
|
||||
found_prompt = true;
|
||||
} else if (found_prompt && !found_output) {
|
||||
// skip fetching wrapped prompt lines
|
||||
while (range_line_is_continued(self, y2)) {
|
||||
y2++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue