Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> I don't think so: we can augment Bo's patch in Text3.cpp
Abdelrazak> like this:
Abdelrazak> + // if this LFUN will clear selection, saveSelection for
Abdelrazak> persistent + // selection + if
Abdelrazak> (lyxaction.funcHasFlag(cmd.action,
Abdelrazak> LyXAction::SaveSelection) + && cmd.argument() != "select")
Abdelrazak> + saveSelection(cur.bv().cursor());
Abdelrazak> +
This is not an option IMO. The "select" argument may mean something
else for other functions
This is a bit far-fetched...
(like "self-insert select" if such a thing
makes sense?)
??
Actually, the strong point of the flag approach (all the
information is in one file) is also its weak spot: when changing
the behaviour of a lfun, it is very easy to forget to set/remove
the SaveSelection flag.
Abdelrazak> The same can be said about specific code in LFUNs.
Except that the specific code is at the same place as the main lfun
code, and one has to see it when following the code path. This is
important for people who do not know the code very well.
And then people who do not know the code very well will not notice that
the selection was already saved somewhere else and put a
saveSelection(), just in case...
It's a bit like the toolbars and dialogs which are updated multiple
times for a single action... The situation is a bit better now there are
things that are done multiple times for nothing in LyX.
Anyway, both solutions are fine with me at this point.
Abdel.