]> git.lyx.org Git - features.git/commitdiff
Backport r40372 in order to fix bug #7909
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 16 Dec 2011 14:13:31 +0000 (14:13 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 16 Dec 2011 14:13:31 +0000 (14:13 +0000)
#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
status.20x

index e637dee19d8013258d39c022c8ecf3feadad192b..1c0ff18db4a04c5a6a6f576ce4ec7b8540da6021 100644 (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();
                }
index 7c06a3aead331d1640bd966b7c176519308c3487..ea49385a3a510442778e72c2458b2544c8ac9bcd 100644 (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