summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-13 22:27:32 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-13 22:27:32 +0200
commit45311b5274a6ac6e44235dfd4588c6b1bf0d4850 (patch)
tree6a4e242e2c509cb3931d7ac8684b7384f69f223c /src/textprop.c
parentf077db24230d10ef9a66ae14da34b639464d8fa2 (diff)
downloadvim-git-45311b5274a6ac6e44235dfd4588c6b1bf0d4850.tar.gz
patch 8.1.1844: buffer no longer unloaded when adding text propertiesv8.1.1844
Problem: Buffer no longer unloaded when adding text properties to it. Solution: Do not create the memfile. (closes #4808)
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/textprop.c b/src/textprop.c
index a97641429..309f3cb79 100644
--- 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)
{