mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
Merge pull request #16414 from zeertzjq/terminal-no-invalid-rows
fix(terminal): return early if there are no invalid rows
This commit is contained in:
@@ -1507,6 +1507,13 @@ static void refresh_screen(Terminal *term, buf_T *buf)
|
||||
// Terminal height may have decreased before `invalid_end` reflects it.
|
||||
term->invalid_end = MIN(term->invalid_end, height);
|
||||
|
||||
// There are no invalid rows.
|
||||
if (term->invalid_start >= term->invalid_end) {
|
||||
term->invalid_start = INT_MAX;
|
||||
term->invalid_end = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
for (int r = term->invalid_start, linenr = row_to_linenr(term, r);
|
||||
r < term->invalid_end; r++, linenr++) {
|
||||
fetch_row(term, r, width);
|
||||
|
Reference in New Issue
Block a user