mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix bug 7673 by reverting changes to BufferView::checkDepm
This reverts commit210a4406
and a part of5577e877
.
This commit is contained in:
parent
1c362cc773
commit
97405fa623
@ -2400,9 +2400,12 @@ bool BufferView::checkDepm(Cursor & cur, Cursor & old)
|
||||
return false;
|
||||
|
||||
d->cursor_ = cur;
|
||||
|
||||
// we would rather not do this here, but it needs to be done before
|
||||
// the changed() signal is sent.
|
||||
buffer_.updateBuffer();
|
||||
|
||||
cur.forceBufferUpdate();
|
||||
cur.screenUpdateFlags(Update::Force);
|
||||
buffer_.changed(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2048,12 +2048,8 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
|
||||
|
||||
updateNeeded |= bv().checkDepm(dummy, *this);
|
||||
updateTextTargetOffset();
|
||||
if (updateNeeded) {
|
||||
if (updateNeeded)
|
||||
forceBufferUpdate();
|
||||
// DEPM may have requested a screen update
|
||||
this->screenUpdateFlags(
|
||||
this->screenUpdate() | dummy.screenUpdate());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -2078,8 +2074,7 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
|
||||
++dummy.pos();
|
||||
if (bv().checkDepm(dummy, old)) {
|
||||
updateNeeded = true;
|
||||
// Make sure that cur gets back whatever happened to dummy (Lgb)
|
||||
// This will include any screen update requested by DEPM
|
||||
// Make sure that cur gets back whatever happened to dummy (Lgb)
|
||||
operator=(dummy);
|
||||
}
|
||||
} else {
|
||||
|
@ -297,8 +297,6 @@ public:
|
||||
* Not using noScreenUpdate() should never be wrong.
|
||||
*/
|
||||
void noScreenUpdate() const;
|
||||
///
|
||||
Update::flags screenUpdate() const { return disp_.screenUpdate(); }
|
||||
/// fix cursor in circumstances that should never happen.
|
||||
/// \retval true if a fix occured.
|
||||
bool fixIfBroken();
|
||||
|
@ -551,9 +551,6 @@ bool Text::setCursor(Cursor & cur, pit_type par, pos_type pos,
|
||||
bool const update_needed = !tm.contains(par);
|
||||
Cursor old = cur;
|
||||
setCursorIntern(cur, par, pos, setfont, boundary);
|
||||
// FIXME There is a chance that we'll miss a screen update here.
|
||||
// If so, then do DEPM and then check if cur wants an update and
|
||||
// go ahead and do it, if so.
|
||||
return cur.bv().checkDepm(cur, old) || update_needed;
|
||||
}
|
||||
|
||||
|
@ -648,12 +648,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
// provide it with two different cursors.
|
||||
Cursor dummy = cur;
|
||||
dummy.pos() = dummy.pit() = 0;
|
||||
if (cur.bv().checkDepm(dummy, cur)) {
|
||||
if (cur.bv().checkDepm(dummy, cur))
|
||||
cur.forceBufferUpdate();
|
||||
// DEPM may have requested a screen update
|
||||
cur.screenUpdateFlags(
|
||||
cur.screenUpdate() | dummy.screenUpdate());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -679,12 +675,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
Cursor dummy = cur;
|
||||
dummy.pos() = cur.lastpos();
|
||||
dummy.pit() = cur.lastpit();
|
||||
if (cur.bv().checkDepm(dummy, cur)) {
|
||||
if (cur.bv().checkDepm(dummy, cur))
|
||||
cur.forceBufferUpdate();
|
||||
// DEPM may have requested a screen update
|
||||
cur.screenUpdateFlags(
|
||||
cur.screenUpdate() | dummy.screenUpdate());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -867,12 +859,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
// provide it with two different cursors.
|
||||
Cursor dummy = cur;
|
||||
dummy.pos() = dummy.pit() = 0;
|
||||
if (cur.bv().checkDepm(dummy, cur)) {
|
||||
if (cur.bv().checkDepm(dummy, cur))
|
||||
cur.forceBufferUpdate();
|
||||
// DEPM may have requested a screen update
|
||||
cur.screenUpdateFlags(
|
||||
cur.screenUpdate() | dummy.screenUpdate());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -921,12 +909,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
Cursor dummy = cur;
|
||||
dummy.pos() = cur.lastpos();
|
||||
dummy.pit() = cur.lastpit();
|
||||
if (cur.bv().checkDepm(dummy, cur)) {
|
||||
if (cur.bv().checkDepm(dummy, cur))
|
||||
cur.forceBufferUpdate();
|
||||
// DEPM may have requested a screen update
|
||||
cur.screenUpdateFlags(
|
||||
cur.screenUpdate() | dummy.screenUpdate());
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user