comparison src/testdir/test_popupwin.vim @ 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 13b02c1ea0f7
children 457ea0570b6f
comparison
equal deleted inserted replaced
30159:b3fe6af68a96 30160:fbf6084346cc
4172 let id = popup_create("Some text", {}) 4172 let id = popup_create("Some text", {})
4173 %bd 4173 %bd
4174 call popup_close(id) 4174 call popup_close(id)
4175 endfunc 4175 endfunc
4176 4176
4177 func Test_term_popup_bufline()
4178 " very specific situation where a non-existing buffer line is used, leading
4179 " to an ml_get error
4180 CheckScreendump
4181
4182 let lines =<< trim END
4183 vim9script
4184 &scrolloff = 5
4185 term_start('seq 1 5', {term_finish: 'open'})
4186 timer_start(50, (_) => {
4187 set cpoptions&vim
4188 var buf = popup_create([], {})->winbufnr()
4189 appendbufline(buf, 0, range(5))
4190 })
4191 END
4192 call writefile(lines, 'XtestTermPopup', 'D')
4193 let buf = RunVimInTerminal('-S XtestTermPopup', #{rows: 15})
4194 call VerifyScreenDump(buf, 'Test_term_popup_bufline', {})
4195
4196 " clean up
4197 call StopVimInTerminal(buf)
4198 endfunc
4199
4177 4200
4178 " vim: shiftwidth=2 sts=2 4201 " vim: shiftwidth=2 sts=2