diff src/testdir/test_textprop.vim @ 29587:d70f588baaa1 v9.0.0134

patch 9.0.0134: no test for text property with column zero Commit: https://github.com/vim/vim/commit/f05a1e59a3df759667f2082cf42368945c57e389 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 2 11:48:53 2022 +0100 patch 9.0.0134: no test for text property with column zero Problem: No test for text property with column zero. Solution: Add a test. Add message to assert for no open popups.
author Bram Moolenaar <Bram@vim.org>
date Tue, 02 Aug 2022 13:00:06 +0200
parents e357bc89bb95
children f2d7f20d83c3
line wrap: on
line diff
--- 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()