]> git.lyx.org Git - features.git/commitdiff
Fix bug #9602.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 7 Jun 2015 21:26:57 +0000 (23:26 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 7 Jun 2015 21:26:57 +0000 (23:26 +0200)
The removed code was introduced at [c668ebf6/lyxgit] to assure that
an inset separator in the last position of a paragraph was getting
removed when hitting backspace with the cursor at the beginning of
the next paragraph. Apparently, it is not needed anymore and can
be removed. This avoids the reported assertion.

src/Text3.cpp

index 3a93ed23d59cb74ef745d3a6bc5d6fa2078706f0..9bd95cc05a31121308f9758cecfb1a2126dfd9d9 100644 (file)
@@ -1071,17 +1071,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_CHAR_DELETE_BACKWARD:
                if (!cur.selection()) {
                        if (bv->getIntl().getTransManager().backspace()) {
-                               bool par_boundary = cur.pos() == 0;
                                // Par boundary, full-screen update
-                               if (par_boundary)
+                               if (cur.pos() == 0)
                                        singleParUpdate = false;
                                needsUpdate |= backspace(cur);
                                cur.resetAnchor();
-                               if (par_boundary && cur.pos() > 0
-                                   && cur.paragraph().isEnvSeparator(cur.pos() - 1)) {
-                                       needsUpdate |= backspace(cur);
-                                       cur.resetAnchor();
-                               }
                        }
                } else {
                        cutSelection(cur, true, false);