Properly fix #9602.

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.
This commit is contained in:
Enrico Forestieri 2015-06-08 00:41:36 +02:00
parent 541984e43e
commit 8f169aa23d

View 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();