Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 17905:fb773f73a4be v8.1.1949
patch 8.1.1949: cannot scroll a popup window to the very bottom
Commit: https://github.com/vim/vim/commit/8c6173c7d3431dd8bc2b6ffc076ef49512a7e175
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 30 22:08:34 2019 +0200
patch 8.1.1949: cannot scroll a popup window to the very bottom
Problem: Cannot scroll a popup window to the very bottom.
Solution: Scroll to the bottom when the "firstline" property was set to -1.
(closes #4577) Allow resetting min/max width/height.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 30 Aug 2019 22:15:04 +0200 |
parents | fa032e079825 |
children | 9606c0adc148 |
comparison
equal
deleted
inserted
replaced
17904:d3e61b35a3b6 | 17905:fb773f73a4be |
---|---|
311 func Test_popup_firstline() | 311 func Test_popup_firstline() |
312 CheckScreendump | 312 CheckScreendump |
313 | 313 |
314 let lines =<< trim END | 314 let lines =<< trim END |
315 call setline(1, range(1, 20)) | 315 call setline(1, range(1, 20)) |
316 call popup_create(['1111', '222222', '33333', '44', '5', '666666', '77777', '888', '9999999999999999'], #{ | 316 let winid = popup_create(['1111', '222222', '33333', '44', '5', '666666', '77777', '888', '9999999999999999'], #{ |
317 \ maxheight: 4, | 317 \ maxheight: 4, |
318 \ firstline: 3, | 318 \ firstline: 3, |
319 \ }) | 319 \ }) |
320 END | 320 END |
321 call writefile(lines, 'XtestPopupFirstline') | 321 call writefile(lines, 'XtestPopupFirstline') |
322 let buf = RunVimInTerminal('-S XtestPopupFirstline', #{rows: 10}) | 322 let buf = RunVimInTerminal('-S XtestPopupFirstline', #{rows: 10}) |
323 call VerifyScreenDump(buf, 'Test_popupwin_firstline', {}) | 323 call VerifyScreenDump(buf, 'Test_popupwin_firstline_1', {}) |
324 | |
325 call term_sendkeys(buf, ":call popup_setoptions(winid, #{firstline: -1})\<CR>") | |
326 call term_sendkeys(buf, ":\<CR>") | |
327 call VerifyScreenDump(buf, 'Test_popupwin_firstline_2', {}) | |
324 | 328 |
325 " clean up | 329 " clean up |
326 call StopVimInTerminal(buf) | 330 call StopVimInTerminal(buf) |
327 call delete('XtestPopupFirstline') | 331 call delete('XtestPopupFirstline') |
328 | 332 |
1727 call VerifyScreenDump(buf, 'Test_popupwin_scroll_8', {}) | 1731 call VerifyScreenDump(buf, 'Test_popupwin_scroll_8', {}) |
1728 | 1732 |
1729 call term_sendkeys(buf, ":call ClickBot()\<CR>") | 1733 call term_sendkeys(buf, ":call ClickBot()\<CR>") |
1730 call VerifyScreenDump(buf, 'Test_popupwin_scroll_9', {}) | 1734 call VerifyScreenDump(buf, 'Test_popupwin_scroll_9', {}) |
1731 | 1735 |
1736 " remove the minwidth and maxheight | |
1737 call term_sendkeys(buf, ":call popup_setoptions(winid, #{maxheight: 0, minwidth: 0})\<CR>") | |
1738 call VerifyScreenDump(buf, 'Test_popupwin_scroll_10', {}) | |
1739 | |
1732 " clean up | 1740 " clean up |
1733 call StopVimInTerminal(buf) | 1741 call StopVimInTerminal(buf) |
1734 call delete('XtestPopupScroll') | 1742 call delete('XtestPopupScroll') |
1735 endfunc | 1743 endfunc |
1736 | 1744 |