summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-02-13 21:31:18 +0100
committerBram Moolenaar <Bram@vim.org>2021-02-13 21:31:18 +0100
commit10ccfb2a17e736ace054b19dc712544b4e961671 (patch)
tree143cce18172b601781a20cfd348ec53d9456ad8a /src/testdir
parent8d4be8901139f698c7919fd697d82abb1ce41911 (diff)
downloadvim-git-10ccfb2a17e736ace054b19dc712544b4e961671.tar.gz
patch 8.2.2510: internal error when popup with mask is zero height or widthv8.2.2510
Problem: Internal error when popup with mask is zero height or width. Solution: Bail out if width or height is zero. (closes #7831)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_popupwin.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 7f5895f96..44b18005f 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -825,6 +825,25 @@ func Test_popup_with_mask()
" this was causing a crash
call popup_create('test', #{mask: [[0, 0, 0, 0]]})
call popup_clear()
+
+ " this was causing an internal error
+ enew
+ set nowrap
+ call repeat('x', &columns)->setline(1)
+ call prop_type_add('textprop', {})
+ call prop_add(1, 1, #{length: &columns, type: 'textprop'})
+ vsplit
+ let opts = popup_create('', #{textprop: 'textprop'})
+ \ ->popup_getoptions()
+ \ ->extend(#{mask: [[1, 1, 1, 1]]})
+ call popup_create('', opts)
+ redraw
+
+ close!
+ bwipe!
+ call prop_type_delete('textprop')
+ call popup_clear()
+ set wrap&
endfunc
func Test_popup_select()