since a few months MiKTeX's package manager required the option "--admin" when calling it with admin privileges
- also register the .lyx21 file extension for LyX 2.3
- also update the LyXRC version number
Basically, everything that does not depend on a BufferView should move
there. Some methods that do not seem to need a BufferView, like
selHandle or IdxFirst or push actually depend on it and could not be
moved.
This allows to simplify a few uses of recordUndo helpers.
- Move some methods to DocIterator: nextMath, prevMath, getPossibleLabel,
getEncoding;
- Move some methods to CursorData: setCursor, setCursorSelectionTo,
(setCursorTo|normal|reset)Anchor, (set|clear)Selection,
sel(|ection)(Begin|End), selectionAsString, info, currentState,
(mark|clear|check)NewWordPosition, fixIfBroken, sanitize, all undo
related methods, reset, isInside, leaveInset, current mode;
- kill some unused methods: macromode, replaceWord, setScreenPos, touch,
markInsert, markErase;
- Move code around to group things, and add a few comments (a lot remains to be done).
This changes lead to some related changes in other classes: removal,
change of parameter.
No intended change.
The goal of this commit is to ensure that a processUpdateFlags call
that requires no redraw will not override a previous one that did
require a redraw.
To this end, the semantics of the flag argument is now different: its
value is now OR'ed with a private update_flags_ variable. This
variable is only reset after the buffer view has actually been
redrawn.
A new Update::ForceRedraw flag has been added. It requires a full
redraw but no metrics computation. It is not used in the main code
(yet), but avoids to compute metrics repeatedly in consecutive
processUpdateFlags calls.
The process is now as follows:
- if flags is just None, return immediately, there is nothing to do.
- the Force flag is honored (full metrics computation) and replaced
with ForceDraw.
- the FitCursor flag is honored and removed from the flags.
- the SinglePar update is added if ForceDraw is not in flags and only
the current par has been modified.
The remaining flags are only then added to the BufferView update
flags, and the update strategy is computed for the next paint event.
Finally the dubious call to updateMacros in updateMetrics has been
removed for performance reasons.
After 6642152e, user macros were no longer wrapped in \ensuremath. In 2.2 and
before, InsetMathMacro behaved as follow:
* Textmode global symbols are wrapped in \text when in math.
* Other global symbols, and user macros, are wrapped in \ensuremath when in
text.
* Undefined macros (ERT) are wrapped neither in \text nor in \ensuremath.
This is also consistent with the documentation of MathEnsurer in
mathed/MathStream.h.
This patch defines InsetMathMacro::currentMode() accordingly (respectively
TEXT_MODE, MATH_MODE and UNDECIDED_MODE) and uses it to determine the output.
After this patch, there is a mismatch between screen and pdf output for user
macros in \text. This is not a regression wrt 2.2 and is because linearization
does not satisfy currentMode() currently.
- If a display math not starting a new paragraph is deleted, the
current \lyxdeleted macro (if any) must be closed and a new one
started, otherwise the display math will be shifted up.
- Use \linewidth instead of \columnwidth because the former will adapt
to the reduced horizontal width in list environments, avoiding shifting
to the right the diplay math.
Unix only:
Using suffixed lyx, we install the lyx-desktop for different versions with
different file name, but with the same 'Name'-entry.
Selecting the desired version with the desktop menu is difficult if there
is more than one lyx version installed.
Spaces are, amazingly, allowed at the end of bibliography keys. So we
introduce a new parameter allowing getVectorFromString not to trim
whitespace, and then use it.
Instantiating a single QSettings and using it for each ui element
can significantly shorten the time required to save the various
states at exit. The speed up can be better appreciated on *nix,
where the settings are saved on disk, rather than on Windows where
they are held in memory (in the registry).
Scanning is rather slow, so this improves performance in specific
situations (multiple inclusion of larger files in master/child or
chapterbib context)