This is a regression in 5e857883 that comes from the fact that the
Update::singlePar flag does not operate on the paragraph that may be
modified but on the one where the cursor currently lies.
Until this is fixed, we do a full update when this situation is encountered.
Fixes bug #13128.
LyX archives created after importing a LaTeX document may not
include bibliography style and catalog files. This is because
tex2lyx does not remove extensions, but the lyxpak script
expects files without extensions. So, teach lyxpak to also take
possible extensions into account.
Fixes#13129
The pair returned by TextMetrics;;getPosNearX is (position, boundary).
Here one had to use short variable names p and b because 'pos' and
'boundary' are a members of Cursor, and [b, p] was use dinstead of
[p,b].
Here, we added a bool & version of boundary() instead to the usual
getter/setter paradigm, because pos() is already like that. It might
be that the setter should be removed later.
Using these two members, it is now possible to use std::tie instead of
auto [,].
This function mostly iterates though a row. Therefore it makes sense
to turn it into a wrapper around an new Row::x2pos() function.
Take this opportunity to use the C++17 structured bindings declaration
instead of passing a bool variable by address (which is only an output
variable).
No change intended.
Introduce a new NoEndBoundary flag for insets like InsetNewline.
Indroduce Row::start_boundary() that is true when previous Row has
end_boundary() set.
Use this to improve cursor movement around row boundaries (both for
logical ad visible cursor movement). The new code remove some of the
newline/separator hardcoding.
In LaTeX, when a displayed equation is at the start of a paragraph,
there is an empty row in front of it. Up to now, this was mimicked in
LyX by increasing the metrics on top of the inset. This commit creates
a real empty row, accessible by the cursor.
To make this work, many small unrelated changes are needed.
* Introduce new AlwaysBreakBefore inset row flag that means "I want a
break before myself, even if that means creating an empty row".
* Let InsetMathHull use that for display math.
* Remove the workaround that was added for InsetMathHull metrics. This
means that MetricsInfo::vmode is not used anymore. I decided to keep it,
since it may prove useful later.
* Handle the flag in TextMetrics::breakParagraph. This requires to add
a new flag 'ignore_contents' to TextMetrics::leftMargin, because we
want the empty row to have a normal left indentation, not the one of
display math (which is also at pos==0).
* In the initial empty row, do not inherit from the centered alignment
of the math inset, although both are at position 0.
* Concerning cursor positioning with mouse, two methods need fixing:
For the vertical part, handle in TextMetrics::getRowIndex the cursor
boundary at position 0 when it is set. Basically, with cursor
boundary true, the cursor will be in the empty row, whereas it will
be in font of the math inset otherwise.
For the horizontal part, handle empty row in TextMetrics::getPosNearX.
Fixes bugs 11593 and 11093.
These scripts help with building and testing LyX, mostly with the
ctest framework.
"lyxbuild" is a build script that has different options (e.g., to
compile with Clang/GCC, Qt 5/6, CMake/autotools). The build script
also has an option to cherry-pick compiler fixes which make it
easier to build older commits on newer compiler versions (useful
when performing a "git bisect"). See "lyxbuild --help" for more
information.
The previous home of lyx-tester was:
https://gitlab.com/scottkosty/lyx-tester
These Astronomy_%26_Astrophysics tests now succeed:
export/examples/Articles/Astronomy_%26_Astrophysics_dvi3_systemF
export/examples/Articles/Astronomy_%26_Astrophysics_pdf4_systemF
export/examples/Articles/Astronomy_%26_Astrophysics_pdf5_systemF
The separation between cpp files and .h files was only necessary for
the monolithic build feature.
Moreover, try to move the stuff in lyx_SOURCES to liblyxcore_a_SOURCES.
Two issues though:
- Box::contains creates a link error, so put all the code in Box.h
- Compare::Compare is an issue too, and I am not sure how to fix it.
For now, it is thus kept in lyx_SOURCES.
Moreover, version.{cpp,h} are moved to lyx_SOURCES to avoid rebuilding
liblyxcore.a at every commit.
I do not know until which version gcc has complained when trying to
mute a warning that it does not support. Recent versions do not do
that.
For now let's just do gcc 7, the limit should be higher.