patch 8.1.1387: calling prop_add() in an empty buffer doesn't work

Problem:    Calling prop_add() in an empty buffer doesn't work. (Dominique
            Pelle)
Solution:   Open the memline before adding a text property. (closes #4412)
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 08b93df..4d620ea 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -752,3 +752,11 @@
   " Same, but delete four columns
   call RunTestVisualBlock(4, '02')
 endfunc
+
+" Adding a text property to a new buffer should not fail
+func Test_textprop_empty_buffer()
+  call prop_type_add('comment', {'highlight': 'Search'})
+  new
+  call prop_add(1, 1, {'type': 'comment'})
+  close
+endfunc