]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
LogUi.ui: string redundancy.
[lyx.git] / src / BufferView.cpp
index e646e2265aa8a4683eb00e799b46536f1c209f2e..94d8c056bac533e22c44d87bca3209b0c1365458 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();
@@ -1920,6 +1920,7 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select)
                update |= checkDepm(cur, d->cursor_);
        d->cursor_.macroModeClose();
 
+       d->cursor_.resetAnchor();
        d->cursor_.setCursor(cur);
        d->cursor_.boundary(cur.boundary());
        if (do_selection)