mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +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
@ -2401,8 +2401,11 @@ bool BufferView::checkDepm(Cursor & cur, Cursor & old)
|
||||
|
||||
d->cursor_ = cur;
|
||||
|
||||
cur.forceBufferUpdate();
|
||||
cur.screenUpdateFlags(Update::Force);
|
||||
// we would rather not do this here, but it needs to be done before
|
||||
// the changed() signal is sent.
|
||||
buffer_.updateBuffer();
|
||||
|
||||
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;
|
||||
}
|
||||
@ -2079,7 +2075,6 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
|
||||
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
|
||||
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