From dc1f50008f6aa4154a30e69f58ee04dbc8a8b60e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 16 Dec 2011 14:13:31 +0000 Subject: [PATCH] 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 --- src/BufferView.cpp | 6 +++--- status.20x | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index e637dee19d..1c0ff18db4 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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(); } diff --git a/status.20x b/status.20x index 7c06a3aead..ea49385a3a 100644 --- a/status.20x +++ b/status.20x @@ -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 -- 2.39.5