comparison 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
comparison
equal deleted inserted replaced
17693:cefb7da6a32c 17694:6f9cde96ee3c
254 semsg(_(e_invalid_lnum), (long)end_lnum); 254 semsg(_(e_invalid_lnum), (long)end_lnum);
255 return; 255 return;
256 } 256 }
257 257
258 if (buf->b_ml.ml_mfp == NULL) 258 if (buf->b_ml.ml_mfp == NULL)
259 ml_open(buf); 259 {
260 emsg(_("E275: Cannot add text property to unloaded buffer"));
261 return;
262 }
260 263
261 for (lnum = start_lnum; lnum <= end_lnum; ++lnum) 264 for (lnum = start_lnum; lnum <= end_lnum; ++lnum)
262 { 265 {
263 colnr_T col; // start column 266 colnr_T col; // start column
264 long length; // in bytes 267 long length; // in bytes