On Tue, Sep 27, 2005 at 04:58:22PM +0200, Jean-Marc Lasgouttes wrote:
> >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> Sort of. But how would you do that? And how would you achieve
> Martin> this while preserving one-paragraph update where that is what
> Martin> you want? I sort of see what you are hinting at, but I have no
> Martin> idea how to do it.
> 
> Martin> Could you demonstrate it by "fixing" one occurrence I inserted
> Martin> of an explicit update call?
> 
> I do not know how to fix it, so I'll ask questions instead :)
> 
>       case LFUN_UP_PARAGRAPH:
>               if (!cur.mark())
>                       cur.clearSelection();
>               needsUpdate = cursorUpParagraph(cur);
> +             cur.bv().update(Update::Force | Update::FitCursor);
>               finishChange(cur, false);
>               break;
>  
> 
> So here we have code that tries carefully to update only if
> cursorUpParagraph says so, and then you issue what looks to me as a
> full update. Why do you need to do that? Could you explain what you
> are doing in this special case?

OK ... I get it.

Changed the code as follows:

        case LFUN_UP_PARAGRAPH:
                if (!cur.mark())
                        cur.clearSelection();
                needsUpdate = cursorUpParagraph(cur);
                lyxerr << "needsUpdate=" << needsUpdate << endl;
                //cur.bv().update(Update::Force | Update::FitCursor);
                finishChange(cur, false);
                break;

As I understand it, the idea is that if a paragraph up motion takes the
cursor off-screen, needsUpdate should become true. Right?

It doesn't... and the screen doesn't scroll up with the update stmt
commented out.

Is this a bug inside cursorUpParagraph?

- Martin


Attachment: pgppDB4hkdT3Y.pgp
Description: PGP signature

Reply via email to