]> git.lyx.org Git - features.git/commitdiff
Enable change tracking if paragraph break change
authorScott Kostyshak <skostysh@lyx.org>
Sat, 17 Aug 2019 20:35:01 +0000 (16:35 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:45 +0000 (15:48 +0200)
When a selection spans more than one line, we now check for whether
there is a change at one position after the last position of each
fully selected line.

This fixes #11629.

src/Text3.cpp

index f234c7cb7d027c95fd979b3cd281c0709092493a..57d44a177f6af21894fd0e20824175c60cf4b0d9 100644 (file)
@@ -3353,7 +3353,9 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                                if (in_last_par)
                                        end = cur.selectionEnd().pos();
                                else
-                                       end = it.lastpos();
+                                       // the +1 is needed for cases, e.g., where there is a
+                                       // paragraph break. See #11629.
+                                       end = it.lastpos() + 1;
                                if (beg != end && it.paragraph().isChanged(beg, end)) {
                                        enable = true;
                                        break;