]> git.lyx.org Git - features.git/commitdiff
Properly fix #9602.
authorEnrico Forestieri <forenr@lyx.org>
Sun, 7 Jun 2015 22:41:36 +0000 (00:41 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 7 Jun 2015 22:41:36 +0000 (00:41 +0200)
Other than checking that we are at the beginning of a paragraph,
we must also check that this is not the first paragraph before
triggering the code that removes the inset separator. This accounts
for the case that we are dissolving an inset from the inside.
Without this additonal check the old code was fooled into thinking
that the separator should have been removed.

src/Text3.cpp

index 3a93ed23d59cb74ef745d3a6bc5d6fa2078706f0..252279a83d2ff14c189820242e617606f8dc0dec 100644 (file)
@@ -1072,12 +1072,13 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                if (!cur.selection()) {
                        if (bv->getIntl().getTransManager().backspace()) {
                                bool par_boundary = cur.pos() == 0;
+                               bool first_par = cur.pit() == 0;
                                // Par boundary, full-screen update
                                if (par_boundary)
                                        singleParUpdate = false;
                                needsUpdate |= backspace(cur);
                                cur.resetAnchor();
-                               if (par_boundary && cur.pos() > 0
+                               if (par_boundary && !first_par && cur.pos() > 0
                                    && cur.paragraph().isEnvSeparator(cur.pos() - 1)) {
                                        needsUpdate |= backspace(cur);
                                        cur.resetAnchor();