patch 8.1.1395: saving for undo may access invalid memory

Problem:    Saving for undo may access invalid memory. (Dominique Pelle)
Solution:   Set ml_line_len also when returning a constant string.
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 811ddf4..cb86186 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -766,6 +766,15 @@
   new
   call prop_add(1, 1, {'type': 'comment'})
   close
+  call prop_type_delete('comment')
+endfunc
+
+" Adding a text property to an empty buffer and then editing another
+func Test_textprop_empty_buffer_next()
+  call prop_type_add("xxx", {})
+  call prop_add(1, 1, {"type": "xxx"})
+  next X
+  call prop_type_delete('xxx')
 endfunc
 
 func Test_textprop_remove_from_buf()