Fix missing last line when getting output of the running command

This commit is contained in:
pagedown
2022-07-02 12:33:58 +08:00
parent 4ed413eaa7
commit 6c80cd040c
2 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -2828,7 +2828,7 @@ find_cmd_output(Screen *self, OutputOffset *oo, index_type start_screen_y, unsig
if (found_next_prompt) {
oo->num_lines = end >= start ? end - start : 0;
} else if (found_output) {
end = direction < 0 ? init_y : downward_limit;
end = (direction < 0 ? MIN(init_y, downward_limit) : downward_limit) + 1;
oo->num_lines = end >= start ? end - start : 0;
} else return false;
oo->start = start;