On Fri, Apr 28, 2006 at 06:40:56PM +0200, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > >> Maybe, but what flag? Or add a fitcursor() member to > >> DispatchResult? > > Martin> Could NoUpdate be overloaded for this? > > We'll have to check that the use case is the right one.
OK, this discussion remains sterile without a patch... The attached illustrates what I mean. It appears to still work (if I have understood the bug correctly), i.e., it is just a modification of Juergen's patch. You see, all the other NoUpdate flags only occur for LFUNs that are not handled in lyxfunc -- I checked. That allows the overloading. - Martin
Index: lyxfunc.C =================================================================== --- lyxfunc.C (revision 13750) +++ lyxfunc.C (working copy) @@ -725,7 +725,8 @@ void LyXFunc::dispatch(FuncRequest const // redraw the screen at the end (first of the two drawing steps). //This is done unless explicitely requested otherwise - bool update = true; + bool update = + !lyxaction.funcHasFlag(cmd.action, LyXAction::NoUpdate); // also do the second redrawing step. Only done if requested. bool updateforce = false; @@ -819,12 +820,10 @@ void LyXFunc::dispatch(FuncRequest const owner->message(str + _(" done.")); } else writeAs(owner->buffer()); - update = false; break; case LFUN_WRITEAS: writeAs(owner->buffer(), argument); - update = false; break; case LFUN_MENURELOAD: { Index: LyXAction.C =================================================================== --- LyXAction.C (revision 13751) +++ LyXAction.C (working copy) @@ -124,8 +124,8 @@ void LyXAction::init() { LFUN_READ_ONLY_TOGGLE, "buffer-toggle-read-only", ReadOnly }, { LFUN_UPDATE, "buffer-update", ReadOnly }, { LFUN_PREVIEW, "buffer-view", ReadOnly }, - { LFUN_MENUWRITE, "buffer-write", ReadOnly }, - { LFUN_WRITEAS, "buffer-write-as", ReadOnly }, + { LFUN_MENUWRITE, "buffer-write", ReadOnly | NoUpdate }, + { LFUN_WRITEAS, "buffer-write-as", ReadOnly | NoUpdate }, { LFUN_CANCEL, "cancel", NoBuffer }, { LFUN_INSET_CAPTION, "caption-insert", Noop }, { LFUN_LEFT, "char-backward", ReadOnly | NoUpdate},
pgplhy58RfsjP.pgp
Description: PGP signature