Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 17442:57b9fca8c7d2 v8.1.1719
patch 8.1.1719: popup too wide when 'showbreak' is set
commit https://github.com/vim/vim/commit/331bafd481fddfe542099d8cccd38d240c10c011
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 20 17:46:05 2019 +0200
patch 8.1.1719: popup too wide when 'showbreak' is set
Problem: Popup too wide when 'showbreak' is set.
Solution: Set window width when computing line length. (closes https://github.com/vim/vim/issues/4701)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Jul 2019 18:00:07 +0200 |
parents | 967e2ee9b656 |
children | 8cca2654d459 |
comparison
equal
deleted
inserted
replaced
17441:b50d3687f31c | 17442:57b9fca8c7d2 |
---|---|
713 call VerifyScreenDump(buf, 'Test_popupwin_nowrap', {}) | 713 call VerifyScreenDump(buf, 'Test_popupwin_nowrap', {}) |
714 | 714 |
715 " clean up | 715 " clean up |
716 call StopVimInTerminal(buf) | 716 call StopVimInTerminal(buf) |
717 call delete('XtestPopup') | 717 call delete('XtestPopup') |
718 endfunc | |
719 | |
720 func Test_popup_with_showbreak() | |
721 if !CanRunVimInTerminal() | |
722 throw 'Skipped: cannot make screendumps' | |
723 endif | |
724 let lines =<< trim END | |
725 set showbreak=>>\ | |
726 call setline(1, range(1, 20)) | |
727 let winid = popup_dialog( | |
728 \ 'a long line here', | |
729 \ #{filter: 'popup_filter_yesno'}) | |
730 END | |
731 call writefile(lines, 'XtestPopupShowbreak') | |
732 let buf = RunVimInTerminal('-S XtestPopupShowbreak', #{rows: 10}) | |
733 call VerifyScreenDump(buf, 'Test_popupwin_showbreak', {}) | |
734 | |
735 " clean up | |
736 call term_sendkeys(buf, "y") | |
737 call StopVimInTerminal(buf) | |
738 call delete('XtestPopupShowbreak') | |
718 endfunc | 739 endfunc |
719 | 740 |
720 func Test_popup_time() | 741 func Test_popup_time() |
721 if !has('timers') | 742 if !has('timers') |
722 throw 'Skipped: timer feature not supported' | 743 throw 'Skipped: timer feature not supported' |
2160 call delete('Xtags') | 2181 call delete('Xtags') |
2161 call delete('Xtagfile') | 2182 call delete('Xtagfile') |
2162 call delete('XtestPreviewPopup') | 2183 call delete('XtestPreviewPopup') |
2163 endfunc | 2184 endfunc |
2164 | 2185 |
2165 " vim: shiftwidth=2 sts=2 expandtab | 2186 " vim: shiftwidth=2 sts=2 |