From 83b1b2c578a3e62437adbd3080c594197da96a3a Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 20 May 2009 19:54:29 +0000 Subject: [PATCH] Revert unwanted commit (r29683) and some cosmetics. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29750 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 3 +-- src/TextMetrics.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index e646e2265a..3f8143f4bb 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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_) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 3baf705c02..7b608ae2da 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1341,7 +1341,7 @@ pit_type TextMetrics::getPitNearY(int y) if (y >= last->second.position() + int(pm_last.descent())) { // We are looking for a position that is after the last paragraph in - // the cache (which is in priciple off-screen, that is before the + // the cache (which is in priciple off-screen), that is before the // visible part. pit = last->first + 1; if (pit == int(text_->paragraphs().size())) @@ -1421,7 +1421,7 @@ Inset * TextMetrics::editXY(Cursor & cur, int x, int y) } ParagraphList const & pars = text_->paragraphs(); - Inset const * insetBefore = pos? pars[pit].getInset(pos - 1): 0; + Inset const * insetBefore = pos ? pars[pit].getInset(pos - 1) : 0; //Inset * insetBehind = pars[pit].getInset(pos); // This should be just before or just behind the -- 2.39.2