Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -269,6 +269,26 @@ func Test_popup_all_corners() call delete('XtestPopupCorners') endfunc +func Test_popup_firstline() + if !CanRunVimInTerminal() + throw 'Skipped: cannot make screendumps' + endif + let lines =<< trim END + call setline(1, range(1, 20)) + call popup_create(['1111', '222222', '33333', '44', '5', '666666', '77777', '888', '9999999999999999'], { + \ 'maxheight': 4, + \ 'firstline': 3, + \ }) + END + call writefile(lines, 'XtestPopupFirstline') + let buf = RunVimInTerminal('-S XtestPopupFirstline', {'rows': 10}) + call VerifyScreenDump(buf, 'Test_popupwin_firstline', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('XtestPopupFirstline') +endfunc + func Test_popup_in_tab() " default popup is local to tab, not visible when in other tab let winid = popup_create("text", {})