diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-09-08 13:43:10 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-08 13:43:10 +0100 |
commit | 58a3cae3eb590c375bf4823052e8d9d4165050de (patch) | |
tree | f93146c40253fe4f8f6953f3ee357138dcfcf071 /src/evalbuffer.c | |
parent | 0500e87eba7b2a82392dbb5d573de19f8ff138e7 (diff) | |
download | vim-git-58a3cae3eb590c375bf4823052e8d9d4165050de.tar.gz |
patch 9.0.0416: ml_get error when appending lines in popup windowv9.0.0416
Problem: ml_get error when appending lines in popup window.
Solution: Only update w_topline when w_buffer matches curbuf.
(closes #11074)
Diffstat (limited to 'src/evalbuffer.c')
-rw-r--r-- | src/evalbuffer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/evalbuffer.c b/src/evalbuffer.c index 15ac58021..3527737b9 100644 --- a/src/evalbuffer.c +++ b/src/evalbuffer.c @@ -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: |