]> git.lyx.org Git - features.git/commitdiff
Revert unwanted commit (r29683) and some cosmetics.
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 20 May 2009 19:54:29 +0000 (19:54 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 20 May 2009 19:54:29 +0000 (19:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29750 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp
src/TextMetrics.cpp

index e646e2265aa8a4683eb00e799b46536f1c209f2e..3f8143f4bbce7a5baf951d955e6ca93ce127c292 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_)
index 3baf705c026725bcc7978197d1f92e2f658d6655..7b608ae2dad4cc146bd55f90242bca75a4dd880a 100644 (file)
@@ -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