]> git.lyx.org Git - features.git/commitdiff
As improbable as it may be, an error could occur in both master and child
authorEnrico Forestieri <forenr@lyx.org>
Fri, 4 Mar 2011 13:52:01 +0000 (13:52 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Fri, 4 Mar 2011 13:52:01 +0000 (13:52 +0000)
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

index fec78d57529fee9db052eecea2f0ad2b88e74c59..686485bd469465205b28fb82def094ccf718d3f6 100644 (file)
@@ -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 =