From: Enrico Forestieri Date: Mon, 7 Mar 2011 20:15:04 +0000 (+0000) Subject: Each line of the exported latex code is associated to a particular par.id() X-Git-Tag: 2.0.0~575 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d5f56e67e05687ec42fc5fa1b82f13c25abfdeb9;p=features.git Each line of the exported latex code is associated to a particular par.id() of a lyx document. What par.id() is associated to the line depends on the last call of TexRow::start() before a newline is actually issued. If the par.id() of an ert is the one associated to the exported line, when an error occurs, that ert is always returned by Buffer::getParFromID() (and thus would be highlighted) whether the error actually occurred there or elsewhere in the same paragraph. So, better highlighting the whole paragraph when the error seems to have occurred in ert. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37870 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index 764717b044..bd60878514 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -172,9 +172,12 @@ bool GuiErrorList::goTo(int item) return false; } - // Don't try to highlight the content of info insets - while (dit.inset().lyxCode() == INFO_CODE) + // Don't try to highlight the content of info and ert insets + while (dit.inset().lyxCode() == INFO_CODE + || dit.inset().lyxCode() == ERT_CODE) { + dit.pos() = dit.lastpos(); dit.forwardPos(); + } // If this paragraph is empty, highlight the previous one while (dit.paragraph().empty())