Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 17245:13a2d3364b3f v8.1.1622
patch 8.1.1622: wrong width if displaying a lot of lines in a popup window
commit https://github.com/vim/vim/commit/e296e3177b67bdcaa8b1f144d2495b9413e7055c
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 3 23:20:18 2019 +0200
patch 8.1.1622: wrong width if displaying a lot of lines in a popup window
Problem: Wrong width if displaying a lot of lines in a popup window.
Solution: Accurately compute the line overflow.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 03 Jul 2019 23:30:07 +0200 |
parents | 3ada3d207b33 |
children | 26e0352613ec |
comparison
equal
deleted
inserted
replaced
17244:dbfac1327a2e | 17245:13a2d3364b3f |
---|---|
1695 edit test_popupwin.vim | 1695 edit test_popupwin.vim |
1696 let winid = popup_create(bufnr(''), {}) | 1696 let winid = popup_create(bufnr(''), {}) |
1697 redraw | 1697 redraw |
1698 call popup_close(winid) | 1698 call popup_close(winid) |
1699 endfunc | 1699 endfunc |
1700 | |
1701 func Test_popupwin_width() | |
1702 let winid = popup_create(repeat(['short', 'long long long line', 'medium width'], 50), { | |
1703 \ 'maxwidth': 40, | |
1704 \ 'maxheight': 10, | |
1705 \ }) | |
1706 for top in range(1, 20) | |
1707 call popup_setoptions(winid, {'firstline': top}) | |
1708 redraw | |
1709 call assert_equal(19, popup_getpos(winid).width) | |
1710 endfor | |
1711 call popup_clear() | |
1712 endfunc |