From 655a99f8c2a500d4cd43b8c8c3062903512acdc8 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Fri, 4 Mar 2011 13:52:01 +0000 Subject: [PATCH] As improbable as it may be, an error could occur in both master and child at the same line. Given that we know where the error occurred, don't unnecessarily check the master first. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37846 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index fec78d5752..686485bd46 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3899,9 +3899,10 @@ void Buffer::bufferErrors(TeXErrors const & terr, ErrorList & errorList) const int errorRow = it->error_in_line; Buffer const * buf = 0; Impl const * p = d; - p->texrow.getIdFromRow(errorRow, id_start, pos_start); - if (id_start == -1) { - // Check whether the error occurred in a child + if (it->child_name.empty()) + p->texrow.getIdFromRow(errorRow, id_start, pos_start); + else { + // The error occurred in a child ListOfBuffers::const_iterator cit = clist.begin(); for (; cit != cen; ++cit) { string const child_name = -- 2.39.2