]> git.lyx.org Git - lyx.git/commitdiff
Move assertion at the right position
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 19 Sep 2024 21:17:48 +0000 (23:17 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 19 Sep 2024 21:18:47 +0000 (23:18 +0200)
It would wrongly trigger when doing a multi-cell selection.

src/Statistics.cpp

index a2e7023155d853549a7473b9942c81cca9fe726d..31e4105895c389d9051183f66f3ddb8cbc5b432d 100644 (file)
@@ -72,8 +72,8 @@ void Statistics::update(Text const & text)
 
 void Statistics::update(CursorSlice const & from, CursorSlice & to)
 {
-       LASSERT(from.text() == to.text(), return);
        if (from.idx() == to.idx()) {
+               LASSERT(from.text() == to.text(), return);
                if (from.pit() == to.pit()) {
                        update(from.paragraph(), from.pos(), to.pos());
                } else {