comparison src/evalbuffer.c @ 30160:fbf6084346cc v9.0.0416

patch 9.0.0416: ml_get error when appending lines in popup window Commit: https://github.com/vim/vim/commit/58a3cae3eb590c375bf4823052e8d9d4165050de Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 8 13:43:10 2022 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Sep 2022 14:45:09 +0200
parents 6c7eddcce52c
children 6d2095a8499d
comparison
equal deleted inserted replaced
30159:b3fe6af68a96 30160:fbf6084346cc
252 if (wp->w_buffer == buf 252 if (wp->w_buffer == buf
253 && (wp->w_buffer != curbuf || wp == curwin) 253 && (wp->w_buffer != curbuf || wp == curwin)
254 && wp->w_cursor.lnum > append_lnum) 254 && wp->w_cursor.lnum > append_lnum)
255 wp->w_cursor.lnum += added; 255 wp->w_cursor.lnum += added;
256 check_cursor_col(); 256 check_cursor_col();
257 update_topline(); 257
258 // Only update the window view if w_buffer matches curbuf, otherwise
259 // the computations will be wrong.
260 if (curwin->w_buffer == curbuf)
261 update_topline();
258 } 262 }
259 263
260 done: 264 done:
261 if (!is_curbuf) 265 if (!is_curbuf)
262 { 266 {