]> git.lyx.org Git - features.git/commitdiff
reduce line noise
authorEdwin Leuven <e.leuven@gmail.com>
Thu, 5 Nov 2009 19:51:17 +0000 (19:51 +0000)
committerEdwin Leuven <e.leuven@gmail.com>
Thu, 5 Nov 2009 19:51:17 +0000 (19:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31864 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp

index d8362e21d9333fe0c80554d7f301dafb55fd9405..c51b6b94bae1234291d33ab3502645c9d1df3182 100644 (file)
@@ -1841,8 +1841,6 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
                if (up) {
                        if (row > 0) {
                                --next_row;
-                               top().pos() 
-                                       = min(tm.x2pos(pit(), next_row, xo), top().lastpos());
                        } else if (pit() > 0) {
                                --pit();
                                TextMetrics & tm = bv_->textMetrics(text());
@@ -1850,24 +1848,19 @@ bool Cursor::upDownInText(bool up, bool & updateNeeded)
                                        tm.newParMetricsUp();
                                ParagraphMetrics const & pmcur = tm.parMetrics(pit());
                                next_row = pmcur.rows().size() - 1;
-                               top().pos() 
-                                       = min(tm.x2pos(pit(), next_row, xo), top().lastpos());
                        }
                } else {
                        if (row + 1 < int(pm.rows().size())) {
                                ++next_row;
-                               top().pos() 
-                                       = min(tm.x2pos(pit(), next_row, xo), top().lastpos());                  
                        } else if (pit() + 1 < int(text()->paragraphs().size())) {
                                ++pit();
                                TextMetrics & tm = bv_->textMetrics(text());
                                if (!tm.contains(pit()))
                                        tm.newParMetricsDown();
                                next_row = 0;
-                               top().pos() 
-                                       = min(tm.x2pos(pit(), next_row, xo), top().lastpos());
                        }
                }
+               top().pos() = min(tm.x2pos(pit(), next_row, xo), top().lastpos());
 
                boundary(tm.x2pos(pit(), next_row, xo) 
                        == tm.x2pos(pit(), next_row, tm.width()));