Georg Baum <[EMAIL PROTECTED]> writes:

| Am Sonntag, 9. Juli 2006 18:44 schrieb Abdelrazak Younes:
| > I see. Then there were a reason why updateMetrics() was before 
| > fitCursor(). Two solution there:
| 
| Yes.
| 
| > 1) re-order the logic so that fitCursor() is called after 
| > updateMetrics() like it was before Lars changes.

Hmm... da hmm...
yes...

What about this:

Index: src/BufferView_pimpl.C
===================================================================
--- src/BufferView_pimpl.C      (revision 14401)
+++ src/BufferView_pimpl.C      (working copy)
@@ -674,18 +674,15 @@
                buffer_->buildMacros();

                // First drawing step
-               bool singlePar = flags & Update::SinglePar;
-               needs_redraw_ = flags & (Update::Force |
Update::SinglePar);
+               updateMetrics(flags & Update::SinglePar);

                if ((flags & (Update::FitCursor | Update::MultiParSel))
                    && (fitCursor() || multiParSel())) {
                        needs_redraw_ = true;
-                       singlePar = false;
-               }
-
-               if (needs_redraw_) {
                        // Second drawing step
-                       updateMetrics(singlePar);
+                       updateMetrics(false);
+               } else {
+                       needs_redraw_ = flags & (Update::Force | 
Update::SinglePar);
                }
        }


| > 2) remove the fitCursor test. Or rewrite it so that it calls 
| > updateMetrics().
| 
| I am not so familiar with the BufferView, so I don't know which is best.
| 
| > What does fitCursor means anyway?
| 
| From BufferView.h:
| 
| /// move the screen to fit the cursor. Only to be called with
| /// good y coordinates (after a bv::metrics)
| 
| "move the screen to fit the cursor" means to move the screen is such a way 
| that the cursor is in the middle of the screen afterwards.

But only if the cursor was outside the viewing area.

-- 
        Lgb

Reply via email to