Backport r40372 in order to fix bug #7909

#7909: mark-on selection is lost during screen-down and screen-up


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40504 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2011-12-16 14:13:31 +00:00
parent ee9699ce39
commit dc1f50008f
2 changed files with 6 additions and 3 deletions

View File

@ -1699,17 +1699,17 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
p = Point(width_, height_);
Cursor old = cur;
bool const in_texted = cur.inTexted();
cur.reset();
cur.setCursor(doc_iterator_begin(cur.buffer()));
cur.selHandle(false);
buffer_.changed(true);
updateHoveredInset();
d->text_metrics_[&buffer_.text()].editXY(cur, p.x_, p.y_,
true, act == LFUN_SCREEN_UP);
cur.resetAnchor();
//FIXME: what to do with cur.x_target()?
bool update = in_texted && cur.bv().checkDepm(cur, old);
cur.finishUndo();
if (update) {
if (update || cur.selection()) {
dr.screenUpdate(Update::Force | Update::FitCursor);
dr.forceBufferUpdate();
}

View File

@ -130,6 +130,9 @@ What's new
- Unify diplay of theorem headings (bug 7883).
- Keep the selection when doing Page Up/Down and in mark-on selection mode
(bug 7909).
* ADVANCED FIND AND REPLACE