diff src/textprop.c @ 17694:6f9cde96ee3c v8.1.1844

patch 8.1.1844: buffer no longer unloaded when adding text properties commit https://github.com/vim/vim/commit/45311b5274a6ac6e44235dfd4588c6b1bf0d4850 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 13 22:27:32 2019 +0200 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 https://github.com/vim/vim/issues/4808)
author Bram Moolenaar <Bram@vim.org>
date Tue, 13 Aug 2019 22:30:06 +0200
parents 121bdff812b4
children 0f7ae8010787
line wrap: on
line diff
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -256,7 +256,10 @@ prop_add_common(
     }
 
     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)
     {