comparison src/testdir/test_popupwin.vim @ 17047:6400d1ad5e4b v8.1.1523

patch 8.1.1523: cannot show range of buffer lines in popup window commit https://github.com/vim/vim/commit/8d241040310a6a27c28d62fa04558f2bfaa5ebde Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 12 23:40:01 2019 +0200 patch 8.1.1523: cannot show range of buffer lines in popup window Problem: Cannot show range of buffer lines in popup window. Solution: Add the "firstline" property. (closes https://github.com/vim/vim/issues/4523)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Jun 2019 23:45:04 +0200
parents 7fe328ad5573
children f4de7ccdfd8c
comparison
equal deleted inserted replaced
17046:b1b684caeb40 17047:6400d1ad5e4b
265 call VerifyScreenDump(buf, 'Test_popupwin_corners', {}) 265 call VerifyScreenDump(buf, 'Test_popupwin_corners', {})
266 266
267 " clean up 267 " clean up
268 call StopVimInTerminal(buf) 268 call StopVimInTerminal(buf)
269 call delete('XtestPopupCorners') 269 call delete('XtestPopupCorners')
270 endfunc
271
272 func Test_popup_firstline()
273 if !CanRunVimInTerminal()
274 throw 'Skipped: cannot make screendumps'
275 endif
276 let lines =<< trim END
277 call setline(1, range(1, 20))
278 call popup_create(['1111', '222222', '33333', '44', '5', '666666', '77777', '888', '9999999999999999'], {
279 \ 'maxheight': 4,
280 \ 'firstline': 3,
281 \ })
282 END
283 call writefile(lines, 'XtestPopupFirstline')
284 let buf = RunVimInTerminal('-S XtestPopupFirstline', {'rows': 10})
285 call VerifyScreenDump(buf, 'Test_popupwin_firstline', {})
286
287 " clean up
288 call StopVimInTerminal(buf)
289 call delete('XtestPopupFirstline')
270 endfunc 290 endfunc
271 291
272 func Test_popup_in_tab() 292 func Test_popup_in_tab()
273 " default popup is local to tab, not visible when in other tab 293 " default popup is local to tab, not visible when in other tab
274 let winid = popup_create("text", {}) 294 let winid = popup_create("text", {})