Mercurial > vim
diff src/testdir/test_popupwin.vim @ 17634:6e6a84993444 v8.1.1814
patch 8.1.1814: a long title in a popup window overflows
commit https://github.com/vim/vim/commit/5d458a7b3d1819d51bff6f3682b81bf943c7e9d0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 4 21:12:15 2019 +0200
patch 8.1.1814: a long title in a popup window overflows
Problem: A long title in a popup window overflows.
Solution: Truncate the title. (closes https://github.com/vim/vim/issues/4770)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Aug 2019 21:15:04 +0200 |
parents | 6146b10714de |
children | daa1dea1c1b3 |
line wrap: on
line diff
--- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -1282,12 +1282,20 @@ func Test_popup_title() " put the title on. let lines =<< trim END call setline(1, range(1, 20)) - call popup_create(['one', 'two', 'another'], #{title: 'Title String'}) + let winid = popup_create(['one', 'two', 'another'], #{title: 'Title String'}) END call writefile(lines, 'XtestPopupTitle') let buf = RunVimInTerminal('-S XtestPopupTitle', #{rows: 10}) call VerifyScreenDump(buf, 'Test_popupwin_title', {}) + call term_sendkeys(buf, ":call popup_setoptions(winid, #{maxwidth: 20, title: 'a very long title that is not going to fit'})\<CR>") + call term_sendkeys(buf, ":\<CR>") + call VerifyScreenDump(buf, 'Test_popupwin_longtitle_1', {}) + + call term_sendkeys(buf, ":call popup_setoptions(winid, #{border: []})\<CR>") + call term_sendkeys(buf, ":\<CR>") + call VerifyScreenDump(buf, 'Test_popupwin_longtitle_2', {}) + " clean up call StopVimInTerminal(buf) call delete('XtestPopupTitle')