This is a work in progress intended to start collective work towards improving the performance of our painting process.
The intent is to make it a living document that is updated as code evolves.
* TexRow now computes rows from a DocIterator. In practice, the cursor
highlighting is now correct inside insets, it is no longer restricted to the
topmost level. It certainly also makes forward-search more precise.
* Added the option to disable a texrow when not needed, for perf.
* Fixed a bug where the last paragraph was not properly highlighted.
Limitations:
* TexRow still does not handle: math (e.g. multi-cell), sub-captions, inset
arguments.
* New TOC "math-macro". This means that math macros can now be accessed in the
outline pane in their order of appearance or in alphabetical order, and can be
searched using the filter.
* Lists of floats now show subfloats deeper in the navigation menu
* The arbitrary 30 element cut-off after which nothing is shown except "Open
Navigator..." is removed. Menus now have no limit in size, so Qt may display
them scrollable. In exchange, we always show "Open outliner..." at the
beginning. I tested for performance issues with a rather complex document and
it is fine; but this does not exclude corner cases with lots of TOC entries of
a certain kind. If necessary, populating the navigation sub-menu should be
delayed like the main menu.
* Elements that do not contribute to the output (e.g. in a note, a disabled
branch) are now preceded with a symbol indicating this status. (The machinery
was already there; I wonder why it was not implemented already.) I have chosen
U+274E NEGATIVE SQUARED CROSS MARK.
* Fix the contextual menus in the outliner (bug introduced at 94e992c5).
* Toc item now move to the caption when present, but first center on the float,
to prevent the situation where the caption is at the top of the screen and the
contents of the float is off-screen above the caption.
(Internally, the action of the toc items can now be customised)
* Fix the LyXHTML output. Disabled captions no longer appear in the list of
figures.
Remove unwanted clearSelection()s in MathData::updateMacros(). These calls broke
text selection with keyboard and mouse, search-and-replace, restoring selection
after Undo, etc. in a document with math macros since 1.6.0. (Regression at
6aa54673 and 12314897)
I do not know the purpose of these calls, but the selection code has been worked
on since, and I cannot produce undesired behaviour after removing
them.
New method TextMetrics::findRowElement, excerpted from CursorX.
Reimplement getSurroundingPos using Row information. This is easy when
the cursor is inside a row element. At row element edges, different
situations can occur; hopefully all these situations are taken into
account.
Rename the old getSurroundingPos to getSurroundingPosOrig and
transform getSurroundingPos into a wrapper that compares the two
methods. This will be removed when we are confident that the new
function is equivalent to the old one.
It will then be possible to remove also the Bidi class (at last!).
Only enable std::regex when the header <regex> is present (fix Mac OS X issue).
Remove support for concept checks. The page
https://gcc.gnu.org/onlinedocs/libstdc++/manual/concept_checking.html
says about concept checking:
Please note that the checks are based on the requirements in the
original C++ standard, many of which were relaxed in the C++11
standard and so valid C++11 code may be incorrectly rejected by the
concept checks. Additionally, some correct C++03 code might be
rejected by the concept checks, for example template argument types
may need to be complete when used in a template definition, rather
than at the point of instantiation. There are no plans to address
these shortcomings.
Therefore it seems reasonable to remove our support for this.
In general this would lead to an immediate runtime crash because the
runtime checks of libstdc++ change the layout of some STL objects.
Therefore, this will only work when the boost libraries have been
compiled with this same flag. At this time, it is not known whether
any linux distribution contains such libraries.
Fixes bug #9736.
- the long awaited MiKTeX installer is available, this fixes many installation errors in LyX is installed for the first time (I will provide a new installer build as soon as I find more time)
There are still a few warnings of the kind
(style) Variable 'x' is assigned a value that is never used.
since I did not touch code where I was not sure whether there might be a real
bug, and I kept some for symmetry reasons as well.
This fixes cppcheck warnings (style) 'class x' does not have a copy constructor
which is recommended since the class contains a pointer to allocated memory.
paralist.sty extends the standard list environments by some more compact
versions. Support for this has already been requested 15 years ago, and
now I needed it myself.
These were all flagged by "(style) The scope of the variable 'x' can be reduced."
Narowing the scope improves readability, and if it is in a loop then the
compiler will be clever enough to produce efficient code, we do not need
manual optimization for POD types.
As Günter found out running the tex2lyx tests overwrites the test references
if the build directory is identical to the source directory. Therefore the
tests would always pass, but git diff would show a non-empty diff if the tests
should have failed. Since it is better anyway to build in a separate directory
we simply do not support srcdir = builddir for the tests and abort with an
error.
This generalises the new use of TocBuilder (97e8101) to listings and wraps and
removes some duplicate code.
Make sure that we will never write an empty float type again in the future
(#9760)
We introduce TocBuilder for building TOCs that take into account both float
insets and their captions.
* Floats without caption are shown with their content.
* Floats with a caption are shown with their caption, but clicking the entry now
correctly moves to the float and not to the caption.
* Subsequent captions produce additional entries in the TOC.
* Figures and subfigures are correctly ordered in the outliner.
* New TOC "senseless" for captions appearing alone (a bit like broken references
are still displayed in the menu and outliner).
* Disable LFUN_CAPTION_INSERT if there is already a caption in a listing
Known issues:
* Inconsistent output for includes located inside floats
* We should record the end of the float in addition of the beginning for a more
accurate cursor -> outliner entry conversion
(#9762)
* fixes a bug where this was already the expected behaviour of
math-subscript and math-superscript but failed.
* corrects the behaviour where if there is \newcommand in the
selection, then a corresponding macro template is introduced
instead of a math inset.
* fixes a bug where math-display, math-subscript and math-supscript
would also introduce such a macro template in a way unrelated to
their function. Now it only happens with math-mode without
arguments.
* fixes a bug where a text that does not denote a macro definition,
e.g. "aaa\newcommandaaa", would produce \invalidmacro.