diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-12 23:40:01 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-12 23:40:01 +0200 |
commit | 8d241040310a6a27c28d62fa04558f2bfaa5ebde (patch) | |
tree | f1a515e27bb96e672c85194b628a15487cafdfea /src/testdir | |
parent | 68d48f40a4da79547b53e3164b658812e154d411 (diff) | |
download | vim-git-8d241040310a6a27c28d62fa04558f2bfaa5ebde.tar.gz |
patch 8.1.1523: cannot show range of buffer lines in popup windowv8.1.1523
Problem: Cannot show range of buffer lines in popup window.
Solution: Add the "firstline" property. (closes #4523)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_popupwin_firstline.dump | 10 | ||||
-rw-r--r-- | src/testdir/test_popupwin.vim | 20 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_popupwin_firstline.dump b/src/testdir/dumps/Test_popupwin_firstline.dump new file mode 100644 index 000000000..276f4e519 --- /dev/null +++ b/src/testdir/dumps/Test_popupwin_firstline.dump @@ -0,0 +1,10 @@ +>1+0&#ffffff0| @73 +|2| @73 +|3| @73 +|4| @33|3+0#0000001#ffd7ff255@4| +0#0000000#ffffff0@34 +|5| @33|4+0#0000001#ffd7ff255@1| @2| +0#0000000#ffffff0@34 +|6| @33|5+0#0000001#ffd7ff255| @3| +0#0000000#ffffff0@34 +|7| @33|6+0#0000001#ffd7ff255@4| +0#0000000#ffffff0@34 +|8| @73 +|9| @73 +@57|1|,|1| @10|T|o|p| diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index 9afd84033..6def8e45a 100644 --- 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", {}) |