Andre Poenitz wrote:

> On Tue, Nov 11, 2003 at 12:24:37AM +0100, Alfredo Braunstein wrote:
>> But we need to rationalize the update calls anyway, and when we do that,
>> we can add an LCursor::update_cache method or something to update the
>> cache at the exact moment we want (I think after an update, in
>> workAreadispatch).
>> 
>> Comments?
> 
> RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
> retrieving revision 1.458
> diff -u -p -u -r1.458 BufferView_pimpl.C
> --- BufferView_pimpl.C  10 Nov 2003 18:15:52 -0000      1.458
> +++ BufferView_pimpl.C  10 Nov 2003 23:02:23 -0000
> @@ -346,6 +346,18 @@ bool BufferView::Pimpl::fitCursor()
>         bool ret;
> 
>  #ifndef LOCK
> +       int x,y;
> +
> +       bv_->cursor().getPos(x, y);
> +
> +       if (y < top_y() || y > top_y() + workarea().workHeight()) {
> +               int newtop = y - workarea().workHeight() / 2;
> +               newtop = std::max(0, newtop);
> +               top_y(newtop);
> +               return true;
> +       }
> +       return false;
> +
>         UpdatableInset * tli =         ////////
>                 static_cast<UpdatableInset *>(cursor_.innerInset());
>         if (tli) {
> 
> 
> This chunk looks funny. The lines ////// are never reached, are they?
> [This does not mean this is wrong, just not "optimal"]

THere is a lot of other not removed dead code (all fuctions called
fit.*ursor for instance, there are like 10 of them scattered around, in
src/ src/insets/, src/frontends/), but there is some that seems to serve to
some particular purpose, only that I don't understand which ;-)
 
Alfredo


Reply via email to