]> git.lyx.org Git - features.git/commitdiff
Amend 71623b88
authorGuillaume Munch <gm@lyx.org>
Sun, 19 Feb 2017 13:54:44 +0000 (14:54 +0100)
committerGuillaume Munch <gm@lyx.org>
Sun, 19 Feb 2017 13:54:44 +0000 (14:54 +0100)
Fix loop of word-delete-backward at the start of a paragraph.

src/Cursor.cpp

index e694a13dddac879d35e442f6c31e2a652794b1b2..2de42ba8ad63967584dfb40084446132ab7a90c2 100644 (file)
@@ -2425,8 +2425,8 @@ bool Cursor::confirmDeletion(bool const before) const
                        return inset->confirmDeletion();
        } else {
                DocIterator dit = selectionBegin();
-               DocIterator const sel_end = selectionEnd();
-               for (; dit < sel_end; dit.posForward())
+               CursorSlice const end = selectionEnd().top();
+               for (; dit.top() < end; dit.top().forwardPos())
                        if (Inset const * inset = dit.nextInset())
                                if (inset->confirmDeletion())
                                        return true;