>>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

Martin> Alternatively, should we really try to interpret every boolean
Martin> that gets returned somewhere as a sign that the screen needs
Martin> updating?

I do not like how this is basically removing Andre's effort of
avoiding updates for no particular reason.

As I understand it, it goes like:

* beginning of LyXText::dispatch

        bool needsUpdate = !lyxaction.funcHasFlag(cmd.action, 
LyXAction::NoUpdate);

So we have marked in LyXAction some lfuns which have no reason to
require an update.

* handling of such an lfun

        case LFUN_UP_PARAGRAPH:
                if (!cur.mark())
                        cur.clearSelection();
                needsUpdate = cursorUpParagraph(cur);
                finishChange(cur, false);
                break;

needsUpdate was false in this case, we set it to true only if DEPM
triggered. 

* end of LyXFunc::dispatch

                default: {
                        view()->cursor().dispatch(cmd);
                        update |= view()->cursor().result().update();
                        if (!view()->cursor().result().dispatched())
                                update |= view()->dispatch(cmd);
                        break;
                }
                }

                if (view()->available()) {
                        // Redraw screen unless explicitly told otherwise.
                        // This also initializes the position cache for all 
insets
                        // in (at least partially) visible top-level paragraphs.
                        if (update)
                                view()->update(Update::FitCursor | 
Update::Force);
                        else
                                view()->update(Update::FitCursor);

We dispatch to the cursor position, and look at the result. Depending
on this result, we do the required update (seeing whether we changed
screen is handled by Update::FitCursor of course).

So my question is what is _your_ vision of the update mechanism. I
guess I do not understand why you change the logic in
BufferView::Pimpl::update.

JMarc

Reply via email to