From 3891b7ae06123665c321a9cc650de6f3ade3488f Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 24 Feb 2011 01:31:20 +0000 Subject: [PATCH] If a paragraph has zero size, highlight the previous one. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37779 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiErrorList.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index 82c7a7f4dc..ca910cf698 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -172,6 +172,10 @@ bool GuiErrorList::goTo(int item) return false; } + // This paragraph has zero size, so highlight the previous one + while (dit.paragraph().size() == 0) + dit.backwardPos(); + // Now make the selection. // if pos_end is 0, this means it is end-of-paragraph pos_type const s = dit.paragraph().size(); -- 2.39.2