Jean-Marc Lasgouttes wrote:

> Georg> The advantage of my patch is that it uses the existing cut and
> Georg> paste code and that it will automatically benefit from future
> Georg> changes to that code.
> 
> I thought again about it during the week-end and came up with the
> following version of the cut-and-paste idea, that I like a lot more.
> This is from my version of the idea, so there may be some problems I
> overlooked (and that you fixed in your version).

I could only find one: The error list is not shown if the file is corrupt.
This could probably be fixed by handing the temp buffer to InsertLyXFile:

Buffer buf("", false);
boost::signals::connection errorConnection =
        buf.error.connect(boost::bind(&BufferView::Pimpl::addError, this, _1));
bool const res = insertLyXFile(cursor_, fname, buf);
errorConnection.disconnect();
bv_->showErrorList(_("Parse"));

> What do you think?

Looks good apart from the errorlist thing. Everything else works as my
version did, plus it does not have the problem with the empty paragraph
after undo.


Georg

Reply via email to