Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 17274:6a7ba68d448e v8.1.1636
patch 8.1.1636: crash when popup has fitting scrollbar
commit https://github.com/vim/vim/commit/437a746b4c1bd65cecc2e9095e911b58b13fce77
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 5 20:17:22 2019 +0200
patch 8.1.1636: crash when popup has fitting scrollbar
Problem: Crash when popup has fitting scrollbar. (Trygve Aaberge)
Solution: Don't divide by zero if the scrollbar just fits. (closes https://github.com/vim/vim/issues/4615)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 05 Jul 2019 20:30:07 +0200 |
parents | 26e0352613ec |
children | b6de6181e5ab |
comparison
equal
deleted
inserted
replaced
17273:25b99b296474 | 17274:6a7ba68d448e |
---|---|
1563 " clean up | 1563 " clean up |
1564 call StopVimInTerminal(buf) | 1564 call StopVimInTerminal(buf) |
1565 call delete('XtestPopupScroll') | 1565 call delete('XtestPopupScroll') |
1566 endfunc | 1566 endfunc |
1567 | 1567 |
1568 func Test_popup_fitting_scrollbar() | |
1569 " this was causing a crash, divide by zero | |
1570 let winid = popup_create([ | |
1571 \ 'one', 'two', 'longer line that wraps', 'four', 'five'], { | |
1572 \ 'scrollbar': 1, | |
1573 \ 'maxwidth': 10, | |
1574 \ 'maxheight': 5, | |
1575 \ 'firstline': 2}) | |
1576 redraw | |
1577 call popup_clear() | |
1578 endfunc | |
1579 | |
1568 func Test_popup_settext() | 1580 func Test_popup_settext() |
1569 if !CanRunVimInTerminal() | 1581 if !CanRunVimInTerminal() |
1570 throw 'Skipped: cannot make screendumps' | 1582 throw 'Skipped: cannot make screendumps' |
1571 endif | 1583 endif |
1572 | 1584 |