comparison src/testdir/test_popupwin.vim @ 23936:a0e02766e06d v8.2.2510

patch 8.2.2510: internal error when popup with mask is zero height or width Commit: https://github.com/vim/vim/commit/10ccfb2a17e736ace054b19dc712544b4e961671 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 13 21:31:18 2021 +0100 patch 8.2.2510: internal error when popup with mask is zero height or width Problem: Internal error when popup with mask is zero height or width. Solution: Bail out if width or height is zero. (closes https://github.com/vim/vim/issues/7831)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Feb 2021 21:45:05 +0100
parents 3033dade50ca
children 0967c54ff3b2
comparison
equal deleted inserted replaced
23935:6668c783ba6f 23936:a0e02766e06d
823 call delete('XtestPopupMask') 823 call delete('XtestPopupMask')
824 824
825 " this was causing a crash 825 " this was causing a crash
826 call popup_create('test', #{mask: [[0, 0, 0, 0]]}) 826 call popup_create('test', #{mask: [[0, 0, 0, 0]]})
827 call popup_clear() 827 call popup_clear()
828
829 " this was causing an internal error
830 enew
831 set nowrap
832 call repeat('x', &columns)->setline(1)
833 call prop_type_add('textprop', {})
834 call prop_add(1, 1, #{length: &columns, type: 'textprop'})
835 vsplit
836 let opts = popup_create('', #{textprop: 'textprop'})
837 \ ->popup_getoptions()
838 \ ->extend(#{mask: [[1, 1, 1, 1]]})
839 call popup_create('', opts)
840 redraw
841
842 close!
843 bwipe!
844 call prop_type_delete('textprop')
845 call popup_clear()
846 set wrap&
828 endfunc 847 endfunc
829 848
830 func Test_popup_select() 849 func Test_popup_select()
831 CheckScreendump 850 CheckScreendump
832 CheckFeature clipboard_working 851 CheckFeature clipboard_working