]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
reorder.
[lyx.git] / src / BufferView.cpp
index e646e2265aa8a4683eb00e799b46536f1c209f2e..3be5cf7cf283969c8408786d61bc1f72416c5880 100644 (file)
@@ -1411,8 +1411,7 @@ bool BufferView::dispatch(FuncRequest const & cmd)
                        p = getPos(cur, cur.boundary());
                }*/
                int const scrolled = scroll(cmd.action == LFUN_SCREEN_UP
-                       ? - height_ : height_);
-               if (cmd.action == LFUN_SCREEN_UP && scrolled > - height_)
+                       ? -height_ : height_);
                if (cmd.action == LFUN_SCREEN_UP && scrolled > -height_)
                        p = Point(0, 0);
                if (cmd.action == LFUN_SCREEN_DOWN && scrolled < height_)
@@ -1422,7 +1421,8 @@ bool BufferView::dispatch(FuncRequest const & cmd)
                cur.reset(buffer_.inset());
                updateMetrics();
                buffer_.changed();
-               d->text_metrics_[&buffer_.text()].editXY(cur, p.x_, p.y_);
+               d->text_metrics_[&buffer_.text()].editXY(cur, p.x_, p.y_,
+                       true, cmd.action == LFUN_SCREEN_UP); 
                //FIXME: what to do with cur.x_target()?
                bool update = in_texted && cur.bv().checkDepm(cur, old);
                cur.finishUndo();