To: vim_dev@googlegroups.com Subject: Patch 9.0.0134 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0134 Problem: No test for text property with column zero. Solution: Add a test. Add message to assert for no open popups. Files: src/testdir/test_textprop.vim, src/testdir/runtest.vim *** ../vim-9.0.0133/src/testdir/test_textprop.vim 2022-08-01 22:18:30.487764922 +0100 --- src/testdir/test_textprop.vim 2022-08-02 11:46:46.740023527 +0100 *************** *** 1611,1616 **** --- 1611,1633 ---- 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() *** ../vim-9.0.0133/src/testdir/runtest.vim 2022-07-04 17:34:06.390292142 +0100 --- src/testdir/runtest.vim 2022-08-02 11:46:08.296109814 +0100 *************** *** 245,251 **** " Check for and close any stray popup windows. if has('popupwin') ! call assert_equal([], popup_list()) call popup_clear(1) endif --- 245,251 ---- " Check for and close any stray popup windows. if has('popupwin') ! call assert_equal([], popup_list(), 'Popup is still present') call popup_clear(1) endif *** ../vim-9.0.0133/src/version.c 2022-08-01 22:18:30.487764922 +0100 --- src/version.c 2022-08-02 11:47:44.699895419 +0100 *************** *** 737,738 **** --- 737,740 ---- { /* Add new patch number below this line */ + /**/ + 134, /**/ -- hundred-and-one symptoms of being an internet addict: 229. You spend so much time thinking what to add on this list. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///