0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.0416: ml_get error when appending lines in popup window

Problem:    ml_get error when appending lines in popup window.
Solution:   Only update w_topline when w_buffer matches curbuf.
            (closes #11074)
This commit is contained in:
Bram Moolenaar
2022-09-08 13:43:10 +01:00
parent 0500e87eba
commit 58a3cae3eb
4 changed files with 45 additions and 1 deletions

View File

@@ -254,7 +254,11 @@ set_buffer_lines(
&& wp->w_cursor.lnum > append_lnum)
wp->w_cursor.lnum += added;
check_cursor_col();
update_topline();
// Only update the window view if w_buffer matches curbuf, otherwise
// the computations will be wrong.
if (curwin->w_buffer == curbuf)
update_topline();
}
done: