]> git.lyx.org Git - features.git/commitdiff
If a paragraph has zero size, highlight the previous one.
authorEnrico Forestieri <forenr@lyx.org>
Thu, 24 Feb 2011 01:31:20 +0000 (01:31 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Thu, 24 Feb 2011 01:31:20 +0000 (01:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37779 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiErrorList.cpp

index 82c7a7f4dc684de16bcf5a732f8d42f044188ad4..ca910cf698c76ced60f8af0f903426e2c5dfab40 100644 (file)
@@ -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();