diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-02 11:48:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-02 11:48:53 +0100 |
commit | f05a1e59a3df759667f2082cf42368945c57e389 (patch) | |
tree | ddc9a0a18a2fcc966e3c03666cb0522d80d3ca80 | |
parent | e175dc6911948bcd0c854876b534fee62fb95b9f (diff) | |
download | vim-git-f05a1e59a3df759667f2082cf42368945c57e389.tar.gz |
patch 9.0.0134: no test for text property with column zerov9.0.0134
Problem: No test for text property with column zero.
Solution: Add a test. Add message to assert for no open popups.
-rw-r--r-- | src/testdir/runtest.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_textprop.vim | 17 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index 69443c5f9..c7140e530 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -245,7 +245,7 @@ func RunTheTest(test) " Check for and close any stray popup windows. if has('popupwin') - call assert_equal([], popup_list()) + call assert_equal([], popup_list(), 'Popup is still present') call popup_clear(1) endif diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index c05a96389..216ae20a4 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -1611,6 +1611,23 @@ func Test_prop_one_line_window() bwipe! endfunc +def Test_prop_column_zero_error() + prop_type_add('proptype', {highlight: 'Search'}) + var caught = false + try + popup_create([{ + text: 'a', + props: [{col: 0, length: 1, type: 'type'}], + }], {}) + catch /E964:/ + caught = true + endtry + assert_true(caught) + + popup_clear() + prop_type_delete('proptype') +enddef + " This was calling ml_append_int() and copy a text property from a previous " line at the wrong moment. Exact text length matters. def Test_prop_splits_data_block() diff --git a/src/version.c b/src/version.c index 75f24c66e..6113e333f 100644 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 134, +/**/ 133, /**/ 132, |