from_master = true;
}
#else
- ErrorList & el = from_master ?
+ ErrorList const & el = from_master ?
bv->buffer().masterBuffer()->errorList(error_type) :
bv->buffer().errorList(error_type);
#endif
return 0;
}
- newBuffer->errors("Parse");
setBuffer(newBuffer);
+ newBuffer->errors("Parse");
if (tolastfiles)
theSession().lastFiles().add(filename);
return false;
}
}
+ if (!buf) {
+ message(bformat(
+ _("No buffer for file: %1$s."),
+ makeDisplayPath(file_name))
+ );
+ return false;
+ }
setBuffer(buf);
documentBufferView()->setCursorFromRow(row);
return true;
buffer->params().maintain_unincluded_children
&& !buffer->params().getIncludedChildren().empty();
bool const success = func(format, update_unincluded);
- delete buffer;
+
+ // the cloning operation will have produced a clone of the entire set of
+ // documents, starting from the master. so we must delete those.
+ Buffer * mbuf = const_cast<Buffer *>(buffer->masterBuffer());
+ delete mbuf;
busyBuffers.remove(orig);
if (msg == "preview") {
return success
#if QT_VERSION < 0x040400
if (!doc_buffer->doExport(argument, false)) {
dr.setError(true);
- dr.setMessage(bformat(_("Error exporting to format: %1$s."),
+ dr.setMessage(bformat(_("Error exporting to format: %1$s"),
cmd.argument()));
}
#else