patch 8.1.1844: buffer no longer unloaded when adding text properties
Problem: Buffer no longer unloaded when adding text properties to it.
Solution: Do not create the memfile. (closes #4808)
diff --git a/src/textprop.c b/src/textprop.c
index a976414..309f3cb 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -256,7 +256,10 @@
}
if (buf->b_ml.ml_mfp == NULL)
- ml_open(buf);
+ {
+ emsg(_("E275: Cannot add text property to unloaded buffer"));
+ return;
+ }
for (lnum = start_lnum; lnum <= end_lnum; ++lnum)
{