Profiling with hotspot show that it counts for more than it should and
indeed using support::contains is a overkill here. I like the new code
better anyway.
I would be surprised to see that it makes a big difference, though.
This is a kind of hack. This allows InsetMathHull to state that it
needs some elbow room beyond its width, in order to fit the numbering
and/or the left margin (with left alignment), which are outside of the
inset itself.
To this end, InsetMathHull::metrics() sets a value in
MetricsInfo::extrawidth and this value is recorded later in the
corresponding row element's `extra' field.
The code could be reorganized to be simpler, in particular by
computing metrics in tokenizeRow, or after tokenizeRow. However the
choice here is to produce a simple patch, fit for 2.4.0.
Fixes bug #12320.
When this parameter is given, only the current paragraph is affected
by the section promoting/demoting.
Note that the new argument is not used yet.
Update release notes and LFUNS documentation.
Part of ticket #12417.
If the cursor is in an inset, and it is closed (e.g., with ctrl + i,
or inset-toggle), the cursor is moved outside of the inset, so the
font must be reset.
The InsetMathChar::write() method directly accesses the otexrowstream
underlying the TeXMathStream class for writing a character, thus
shortcircuiting the mechanism that allows to separate a macro from the
following material. It has to do so because directly writing a char_type
would cause printing its numerical value instead of the corresponding
unicode character in systems where char_type is typedef'd to uint32_t.
This problem has been uncovered by [7441172d/lyxgit] because each atom
of a mathed cell was being separately written to the output instead of
using the lyx::write() method in MathExtern.cpp that simply converts
everything to a docstring. As InsetMathChar::write() is the only method
bypassing the TeXMathStream machanism, it is simpler teaching it to
honor the pending space instead of modifying the code in InsetMathColor.
This commit amends 7441172d.
The function outline is modified to operate only in the inset that
contains the cursor. This means that the function can be enabled in
insets (this had been forbidden to fix#5004).
Of course, there may be cases where the user expects something to
happen outside of the inset. I am sorry to announce that this is not
going to happen ;)
Fixes bug #12809.
This patch reuses the code of TextMetrics::displayFont() that handles
the label part of LABEL_MANUAL paragraphs to create a new
labelDisplayFont() method usable for things like Itemize labels.
To this end, and new magic value is used as position to force the
label case in displayFont(). The code is also factored a bit and
cleaned up.
Fixes bug #12810.
Otherwise we get the following warning:
src/frontends/qt/InsertTableWidget.h:44:7: error: 'hideEvent' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
void hideEvent(QHideEvent * event);
^
Amends ca5a75b2.
Jürgen cleaned up the previous contents of this "BUGS" file. What
was left (before the rm in this commit) had been written in 2001 at
2dd1a460, and it is not clear if it is still relevant.
This commit is very wrong when trivstrings are used (since what is
retirned is a temporary variable) and it turns out that cygwin
requires this for some reason.
This reverts commit 3ae5d6bdec.
For some reason, the code that should have been put in
updateCaretGeometry() went to resetCaret(). I do not see how that made
sense.
I am not totally sure what the consequences of the patch are, though.
It just "looks right".
This pane is responsible for horizontal excess size (at least in CZ
translation) of document settings panel. The reason is second encoding combo
which get very lengthy (there are actually 3 of them).
This patch moves them to separate line.
Beware, touching this panel is headache.
Qt Designer (5.15.2) does not know even how to load this ui
file correctly and it's impossible to move unicodeEncodingCO.
When breaking layout this CO is mysteriously deleted.
Finally I gave up and simply edited file in vim to get COs to the new row.
It turns out that LyX was using red as default color for the
inset button text since ever. However, due to the use of "inherit",
the default button text color was black in practice. This was so
until [897ee2ed/lyxgit], which made the label font not inherited
by default anymore. Hence, all insets that didn't specify a specific
label button color started using red as default color.
This commit restores the previous behavior and introduces the
possibility of modifying this default color.
Fixes bug #12771
This fixes the g++ 12 warnings below.
../../master/src/Converter.cpp:714:55: warning: possibly dangling reference to a temporary [-Wdangling-reference]
714 | Mover const & mover = getMover(conv.to());
| ^~~~~
../../master/src/Converter.cpp:714:71: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::to() const())’
714 | Mover const & mover = getMover(conv.to());
| ~~~~~~~~^~~~~~~~~~~
../../master/src/Converter.cpp:786:39: warning: possibly dangling reference to a temporary [-Wdangling-reference]
786 | Mover const & mover = getMover(conv.from());
| ^~~~~
../../master/src/Converter.cpp:786:55: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::from() const())’
786 | Mover const & mover = getMover(conv.from());
This is done at the end of the release cycle to avoid backporting issues.
The goal is to simplify development, since it was difficult to guess
in which file a given method could be found.
There is some effect on compilation time, but it is not too bad:
* before merge
lapinot: time make Text.o Text3.o Text2.o
CXX Text.o
CXX Text3.o
CXX Text2.o
real 0m32,504s
user 0m31,027s
sys 0m1,446s
lapinot: rm Text*.o
lapinot: time make -j8 Text.o Text3.o Text2.o
CXX Text.o
CXX Text3.o
CXX Text2.o
real 0m21,282s
user 0m32,661s
sys 0m1,424s
* after merge
lapinot: time make Text.o
CXX Text.o
real 0m26,731s
user 0m25,706s
sys 0m1,020s
Due to a macOS peculiarity, it is necessary to handle KeypadModifier.
We do it unconditionnally, although only macOS seems to be affected.
"Note: On macOS, [...] The KeypadModifier value will also be set when
an arrow key is pressed as the arrow keys are considered part of the
keypad." (https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum)
Related to bug #12572.
This is a follow-up to 5be391b2, which increased the space on
left/right of graphics inset. This extra space makes sense in normal
graphics editing, but is weird in the case of InsetInfo, which has its
own spacing.
Create a special tight graphics inset class, and use that for icons.
Qt 6.5.0 has dropped support for the QWindowsMime class
in favor of a new QWindowsMimeConverter class. They say:
"If you have implementations of QWindowsMime or QMacMime in Qt 5,
then those will almost directly translate to the new APIs but
require less boiler-plate code to register the converters with Qt."
This may be true, but in practice they break binary compatibility with
previous versions. If you used the QWindowsMime class until Qt 6.4 by
using boiler-plate code to register the converters with Qt, you now
need to modify the sources and recompile. Fantastic!
Declare override, otherwise we get the following warning:
src/insets/InsetListings.h:42:7: error: 'isEnvironment' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
bool isEnvironment() const { return !params().isInline(); }
^
src/insets/Inset.h:606:15: note: overridden virtual function is here
virtual bool isEnvironment() const { return getLayout().latextype() == InsetLaTeXType::ENVIRONMENT; }
^
1 error generated.
This fixes on-screen appearance of things like code with lines longer
than the window width.
The TeXbook makes it clear by indicating that \fontdimen3 == 0 for
these fonts.
The test that was used to avoid breaking a string that was followed
by a too long element was not correct (especially the part that
compared with total row width).
Typical example here is:
- a word with a part that has a font change like /un/breakable;
- a longish sentence after it.
Use a new test that is good enough for this particular case, although
with sortcomings. I do not want to overcomplicate and prefer to wait
for other complaints (this code is already more complicated that I
would like).
Document known shortcoming.
Fix ticket #12660.
Instead of actually fixing the messiness of InsetInfo, let's just fix
the symptom and avoid the access to Paragraph::id() that was crashing
LyX every time updateBuffer/validate/metrics/draw did not happen in
the right order.
Fixes bug #12639.
After removing/adding rows, the corresponding equation numbers in
the LyX display were not updated (although if you clicked outside
the math inset they were).
Now they are updated immediately after the operation.
Parts, chapters and sections have different LabelTypes, but this does
not mean they cannot be transformed into each other while doing
OUTLINE_IN/OUT
Not sure why the labeltype check is here anyway, but let's keep it.
This is my 635th lesson that trying to be too clever is not that good.
This change interferes with the yet-to-come fix to #12674.
This reverts commit cc6dae1363.
When computing the width of the button, some code has been added in
04ece4f0 to shorten the space in LeftButton geometry. It turns out
that the Left/Top-button-ness is not always known at this point (since
it depends on the width itself!).
Therefore, it is better to make the button narrower also in the
TopButton case.
See the thread
2.4 Crash (was: Updated LaTeXConfig.lyx (bxjsclasses added))
on lyx-devel (26/01/2023).
The backtrace imply a problem like:
1/ metrics are computed for some info inset
2/ the info inset is regenerated (and thus the paragraph it held is now invalid)
3/ We draw the inset and because of the new (disabled by default)
bookmark display code, we access the id() of the invalid paragraph.
4/ boom!
To fix the issue, introduce a new boolean member that indicates when
the Row object of the metrics should not be used. In this case, the
draw() method returns early.
Typically there are two sources of spacing:
* the button has two pixels added to the left and to the right
* the frame around the text also has 2 pixels to the left and to the right
Note that this value of two pixels is given here for simplicity, but
these are parameterized by methods like textOffset or leftOffset.
What we want to remove is the space after the button and the space
before the frame. This is done in 3 places
In dimensionCollapsed(), the extra space is removed from the dimension
after its computation
In metrics(), the space avoided before the frame is removed from width.
In draw, the whome text inset is drawn with a negative offset.
Fixes#12335.
This commit had had an additional not documented change: redraws
happen only when they are needed. This did not help fix the bug, but
looked smart on first sight. Alas, I find that these smart changes
added because "why not?" tend to come back to haunt me eventually.
In particular this case, the problem was that the code tested whether
the offset of anchor paragraph had changed, but not whether the
paragraph itself had changed. This means that, when switching from one
section to another with the outliner, the view was not updated.
Fix the following warning:
src/frontends/qt/GuiDocument.h:377:7: error: 'eventFilter' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
bool eventFilter(QObject * sender, QEvent * event);
^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:139:18: note: overridden virtual function is here
virtual bool eventFilter(QObject *watched, QEvent *event);
^
Amends 62413580de.
If `havetable == true`, a lot of the code didn't make any sense: in particular, it was outputting a level of <m:mrow> too many.
Also, add some comments and rewrite the comment about mlabeledtr.
Contributed by lynx: https://www.lyx.org/trac/ticket/12629
This was:
../../master/src/mathed/InsetMathBox.cpp:116:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
116 | for (int i = 0; i < parts.size(); i += 2) {
| ~~^~~~~~~~~~~~~~
../../master/src/mathed/InsetMathBox.cpp:120:20: warning: comparison of integer expressions of different signedness: ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
Error noticed by Coverity:
*** CID 382777: Memory - illegal accesses (RETURN_LOCAL)
/home/lasgoutt/src/lyx/coverity/lyx/src/insets/InsetIndex.cpp: 1866 in _ZNK3lyx15InsetPrintIndex5xhtmlB5cxx11ERNS_9XMLStreamERKNS_12OutputParamsE()
1860
1861 // Collect the index entries in a form we can use them.
1862 vector<IndexEntry> entries;
1863 const docstring & indexType = params().getParamOr("type", from_ascii("idx"));
1864 for (const TocItem& item : *toc) {
1865 const auto* inset = static_cast<const InsetIndex*>(&(item.dit().inset()));
>>> CID 382777: Memory - illegal accesses (RETURN_LOCAL)
>>> Using "indexType", which points to an out-of-scope temporary variable of type "lyx::docstring const".
1866 if (item.isOutput() && inset->params().index == indexType)
1867 entries.emplace_back(IndexEntry{inset, &op});
1868 }
1869
1870 // If all the index entries are in notes or not displayed, get out sooner.
1871 if (entries.empty())
Rationales:
- previously, <mstyle> was used, but it's being deprecated for MathML 4 Core in favour of CSS and <mrow> (not a big deal in itself)
- the whole box cannot be hosted within the same tag, because neither <mstyle> nor <mrow> can have text, they need an intermediate container, <mtext> (which cannot hold anything else that pure text)
- new behaviour: always output a container for the whole box that has the right attributes, i.e. an <mrow>; split the content of the cell to have text and other tags set apart (text in <mtext>, other tags left as they were)
Old behaviour, invalid MathML (2 to 4):
<mstyle XXX>text<mn>.</mn></mstyle>
New behaviour, valid MathML:
<mrow XXX><mtext>text</mtext><mn>.</mn></mrow>
The inset represents text (as opposed to maths in formulae). <m:mstyle> is used to give style to its children, it is not supposed to have any contents on its own.
Instead of asserting when there are unprocessed row elements (which,
as I understand it, should almost never happen), play safe and keep
them for later processing.
Related to bug #12617.
- present appropriate alert message in case of missing Python
- add the option to quit LyX immediately
- recheck for Python interpreter on reconfigure if it was missing
Warning was as follows:
src/tex2lyx/Parser.cpp:898:39: error: adding 'uint32_t' (aka 'unsigned int') to a string does not append to the string [-Werror,-Wstring-plus-int]
warning_message("ignoring a char: " + static_cast<uint32_t>(c));
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/tex2lyx/Parser.cpp:898:39: note: use array indexing to silence this warning
warning_message("ignoring a char: " + static_cast<uint32_t>(c));
^
& [ ]
1 error generated.
First and foremost, this patch implements the latest best practices in C++ (i.e. comparison operators are not member functions).
The main objective of this rewrite is to have these operators callable in slightly more general contexts (*this->asFontTag() == *rhs.asFontTag() yielded an error because no member function could be called). This feature is no more required.
The rewrite took place in the context of https://www.lyx.org/trac/ticket/12585. The first iteration was using more complex code to circumvent XMLStream in DocBook (see details in the bug above and in the mailing list), while this one uses XMLStream fully. The bug was due to font tags being considered equal when they were not, due to the comparison done only on the XML tag and not on the actual font change (XML attributes can complement the tag for various font changes).
The new parameter allows more flexibility when encoding some elements that have a poor mapping in DocBook, like theorems. The major use is to wrap the environment in a generic container, figure, which requires a title (but none is available).
* disambiguate "Other" label
* Add accelerator
* Add tooltip to "Other" widget
* Amend tooltip of "Web" widget (since "other" now seems to have taken
part of its function)
Missing return in `specialCharKindToXMLEntity`. Previously, the
functions that were merged into `specialCharKindToXMLEntity` did not
return any kind of error in case an unknown special character is met
(enumerated value). This behaviour is preserved.
This is a new take on c8e2c17a that was reverted at da67bde61a due to entities no more recognised by the browsers. Corresponding thread on the mailing list: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg213179.html
This patch is a huge cleanup overall, by removing the distinction between HTML and XML entities (the latter arrived due to the DocBook support).
In InsetListingParams, I also changed the mechanism that relied on " to use an XML entity to be consistent with the rest of the code, mostly in case someone looks for HTML entities and wonders why they are still there.
Also, perform the URL fixing magic for DocBook and XHTML.
As it was, it was impossible to enter e.g. "tel:" type links. Now
choosing the "Other" type just outputs the URL as given.
Also, the addition of "http" or "file" was not being done for
DocBook and XHTML. Now it is.
This adds a warning icon to either the tab header or the panel stack
entry item if a widget on the panel/stack has invalid content.
Particularly helpful to get aware of such content on other tabs/panes
than the one currently selected.
Before, there was always a space after the tag, even when there were no attributes. Now, the space is output conditionally, so that the output makes more sense.
Before, one space too many for the tag name (title), casting doubt on whether the code had this space hard coded or not:
<!-- Output Error: Unrecognised tag type 'para' for 'title ' -->
After, no such space:
<!-- Output Error: Unrecognised tag type 'para' for 'title' -->
Remove some special cases that I do not really understand and
streamline the cases.
Also make sure that there is only one code path for centering.
Fixes bug #12491.
Instead of having to add and individually test the versions to check
for, we store the current version and test on that with a specific
function isAvailableAtLeastFrom(package, year, month, day)
Currently only used for the LaTeX version, but could also be extended
for package versions.
If the main language does not require the inputenc package, but a
secondary language does, inputenc needs to be loaded as well
(without options)
Also simplify the code a bit.
- new function to list bibtex databases
- citation-insert returns the list of undefined keys
if the request comes from the LyX server
Original patch from Benjamin Piwowarski (2012!).
Modified and updated by Riki Heck and myself.
File switches with documents are done via \inputencoding.
Other than with fontenc, these do not need to be laoded via options
beforehand.
Also, out current code loaded the additional languages' encoding last,
which might result in wrong encoding settings.
This restores the previous behavior of runCommand().
When the child process could not be properly terminated the
error "RunCommand: could not terminate child process" was being
issued. However, in fb7b7e52 there was a misinterpretation
between this condition and the exit status of the child and
these two different errors were mixed up. They are now
disentangled again.
Apostrophes were being converted inside code-like areas, like LilyPond insets. This patch fixes tests that started to fail:
Processing `./60/lily-95ee389a.ly'
Parsing...
././60/lily-95ee389a.ly:7:12: error: undefined character or shorthand: &
\relative c
’’ { g a b c}
This is similar to what LaTeX does in its output.
See the (long) discussion in ticket #11244. Port of ad3e6c69b2 for DocBook.
This patch requires delaying entire strings instead of just characters, so that the DocBook code path can be as similar to the XHTML one as possible.
Instead of specifying "force" to disable the deletion protection
mechanism, invert the default so that "confirm" is needed to activate
it. The idea is to keep the lfun reasonable for scripting and add a
special argument for interactive use.
Document in release notes.
Update LFUN.lyx documentation
Update bind files.
Add conversion step to prefs2prefs_lfun.py.
Remove all trace of Qt4 support. The different elements have been
considered carefully before removal.
The only changes that need to be done concern Windows and macOS
compilation instruction and will need to be taken care of by the
respective maintainers before prerelease.
The file TODO.killqt4 lists what remains to be done.
This macros are important for particle physicists. Note that the
package hepparticles as distributed in recent texlive does not work
(see #11804) and need to be patched. This is however not something we
can do, and any physicist wanting to use this will have patched his
own version I guess.
I contacted Andy Buckley, the author of the package, who answered that
he is aware of the issue but does not have time right now to fix it.
The workaround is straightforward: on line 176 of hepparticles.sty,
replace "\updefault" by "n".
Two parts:
- add *lots* of definitions to lib/symbols
- add hepparticles and hepnames as simple features in LaTeXFeatures.
The definitions are courtesy of @renyhp, and extracted from the
aforemented packages:
https://www.ctan.org/pkg/hepparticleshttps://www.ctan.org/pkg/hepnames
Fixes bug #11804.
We now allow the user to cancel the background process at any point
(via the red "x" in the status bar or Document > Cancel Export), so
we do not need to poll the user with the dialog.
The patch works by setting timeout to "-1" which is treated as a
special value to disable the poll.
Fix (by obviation) #12531 and #9953, which were about the dialog.
An export can be canceled by clicking on the status bar icon or by
executing export-cancel (e.g., via Document > Cancel Background
Process).
The centralized code kills the script and updates the status bar
icons.
No change in functionality intended.
Related commits: 70a71a82 and 01abab9a.
This is consistent with 70a71a82 (which is about the code path
through clicking on the 'x' status bar icon).
In the next commit I'll make a function to centralize this sequence
of killing a script and emitting the scriptKilled() signal.
Removing. M-c e has a different meaning nowadays
(tabular-feature delete-vline-left)
Please file a new report with an updated description if this is still
an issue.
LyX removes a single backslash when it is inserted in a
macro name by the keyboard. However if it is followed by
another character before moving the cursor, it is retained
causing an assertion (bug #12601).
Disable the arguments append-column and delete-column of tabular-features.
The code is taken from InsetMathCases, with some changes
* no need to record undo here
* in dispatch, return is prefered to break, since we do not want to invoke
InsetMathGrid::doDispatch.
Propagate these changes to InsetMathCases.
Cleanup of the InsetMathCases error messages to fit with other parts
of the code.
The handling of tabular-features in mathed needs to be unified somehow.
Based on a commit from lynx <lorenzobertini97@gmail.com>
Part of bug #12590.
Qt >= 5 refuses to display them. We work around this in lib/symbols
already, but make sure we do not try to display math glyphs at these
code points anyway.
Fixes bug #8493.
Backslashes are not allowed in macro names and LyX
enforces this by not allowing entering them by keyboard.
However, it was possible to paste them and this may cause
crashes (see bug #12596).
The previous code explicitly disabled it and this behaviour caused problems (like "A&A" being output as-is, which is wrong in HTML: it should be "A&A").
Qt4 code has been identidifed by
git grep -l 'QT_VERSION.*\(0x050000\|0x04\)' src
Uses of QT_VERSION_CHECK have been checked too.
been used to remember what places need further work.
Then remaining Qt4 references have been searched using
git grep -i qt4
git grep -i 'qt 4'
and relevant issues have been either fixed or noted in the new
TODO.killqt4 file.
It appears that gcc 4.9 does not implement the following part of C++11:
https://cplusplus.github.io/CWG/issues/1148.html
Therefore, we have to use a special case in C++11 mode that does an
explicit std:move.
With recent compilers (gcc >= 9), this leads in C++11 mode to a warning:
MetricsInfo.cpp: In member function ‘lyx::Changer lyx::MetricsBase::changeFontSet(const string&)’:
../../master/src/MetricsInfo.cpp:83:13: warning: redundant move in return statement [-Wredundant-move]
83 | return move(rc);
| ~~~~^~~~
MetricsInfo.cpp:83:13: note: remove ‘std::move’ call
Partly reverts commit fff28c57.
This branch improves handling of spaces on display (see #10117):
* caret is correctly shown in the middle of double spaces in justified rows;
* sequence spaces are correctly shown at the end of rows before
automatic row breaks.
Moreover, this branch:
* streamlines the code that handles spaces in row breaking
* improves display in Qt4 : although the improvements outlined above
are not present in Qt4 for monospaced fonts, some dsplay glitches
are resolved.
* improves performance for very long paragraphs (#12598).
When is it detected that our zero-width characters are not really
zero-width, avoid to use them altogether. Currently, this is known to
happen in Qt4 with monospace fonts.
This allow to remove the special Qt4 code in breaskString_helper.
Related to bug #10117.
This allows to create a new version that takes an already built
TextLayoutHelper struct as parameter.
No intended change.
See discussion in bug #10117.
In order to work around the Qt row breaking algorithm, which considers
multiple spaces as one at QTextLine break, we insert word_joiner unicode
characters beteween each pair of spaces.
The TextLayoutHelper class makes it easy to handle that.
Update Row::Element::rtrim() to only remove one space at row end.
Update support::countExpanders() to count all spaces, without special
handling for consecutive ones.
Fixes bug #10117.
This new code allows to get rid of some hardcoded stuff and will be a
foundation for handling of consecutive spaces.
This code can be used in the future for getTextLayout, x2pos, and
pos2x in order to streamline code. Actually some features as the naked
parameter are here to prepare for this second set of changes.
No change intended. The modified code is much clearer, though.
Related to bug #10117.
When there is no module, the old code would invoke tex2lyx with option
-m
instead of
-m ""
and an error would ensue.
This is because the QProcess command line parser used in Systemcall is
broken and does not recognize empty parameters as such. The solution
is to rewrite our parsecmd() parser to generate a list of parameters.
This is post-2.4.0 work.
The workaround used here is:
- set the list of modules to "," when it should be empty. In effect,
this is a list of two empty modules.
- change tex2lyx to accept empty module names and ignore them; this is
good in terms of robustness anyway.
Additionally, when there is no receiving buffer, set the defaults as
the BufferParams defaults instead of empty (this is cleaner, but
should not make a difference in practice).
In the long term, we should switch to use the QStringList-based API of
QProcess in Systemcall (see QTBUG-80640).
This is a convenience function for indexing. It adds a copy of the
index inset under cursor after any word in the buffer that is equal
(case-insensitively) to the word preceding the index inset.
The function can be easily used to generate bad indexes (and I warn
about that in the UserGuide), but if used with care, it can also be
extremely convenient.
Previously, only the suggestions starting with the current input were
shown.
Contains the following minor improvements:
- Add space to indicate when only one suggestion is found
- Select first item in suggestion-list in order to make selecting with
arrow keys more intuitive
- Fix selection with Shift+Up/Down in text-field
Fix for bug #12572.
The new function inset-insert-copy can only be invoked from the ToC.
It is currently only implemented for Index inset.
It is a special lfun because Inset::dispatch is called directly from
the ToC widget with cursor pointing to the inset, whereas the patch
happens in the workarea at caret position. This function cannot be
called directly.
Add an entry for this function in the toc context menu.
Fixes bug #4582.
The change ensures that the function is not seen by the compiler when
the debug mode is not enabled. The flag is not set by default, because
it might have a significant performance impact for large indices.
The reason for the flag is that the default configuration under Linux
forbids the definition of unused functions.
**WARNING; only compilation has been ested; even that does not work**
The goal of this commit is to use the list-based API to
QProcess::start, to avoid annoying syntax issues (see issues with
pasting from LaTeX).
* Create a new latexEnvironment() in filetools.h that returns a
map<string, string> containing the variables and their values.
* Rewrite parsecmd() so that it returns a QStringList of tokenized parameters.
* Use this in startProcess. This is the part is is not finished yet.
Obviously, this will not be possible to get right for 2.4.0.
This reverts commit 008a0825e8.
This commit was part of bug #12310. The goal was to remove the
selection when using "up" at the start of selection (so that the
cursor cannot move). Unfortunately, it creates navigation issues for
insets inside tabulars.
Since the fix was minor, the safest decision is to revert.
The part of ticket #12310 that resets selection with
char-forwars/backward when moving is not possible still works.
Fixes bug #12593.
This quashes a new warning in clang++ 15, when std::move() (the
one-parameter version) is used as simply move(). There is a strong
recommendation from WG21 to avoid that.
Details here: https://reviews.llvm.org/D119670
It might be that we should not use that many move()s. I am not
competent to decide on that.
I also used this occasion to get rid of a spacial casing for C++11
that does not seem necessary after all.
Being able to insert completion in a read-only document is definitely
a bad idea.
This patch acts both on indication of completion and on insertion
itself.
Fixes bug #12582.
I mathed, undo should record the underlying inset on completion,
whereas in test recording the paragraph is enough.
Therefore the recordUndo() in GuiCompleter::tab is removed, and the
relevant recordUndo/recordUndoInset are used at the right places.
As a further cleanup, the parameter `finished' of
Text::insertCompletion is removed as it is useless.
Fixes bug #12581.
This amends [4a7a1935/lyxgit]. Before 4a7a1935 it was assumed
that a labeled row was also numbered. Hence, when unnumbering
a row a label was also deleted. We now have to do this explicitly.
From Kornel:
> /usr2/src/lyx/lyx-git/src/Paragraph.cpp:1931:1: warning: control reaches end of non-void
> function [-Wreturn-type]
>
> This is with gcc-12, compiled in debug mode.
With a string like "abc def [inset]", it should be possible to break
between the "def" and the inset. A case of interest is when "abc def "
is too long, but "abc def" is not.
To this end, tweak the test that look whether breaking was successful:
the right width to look at is nscp_width, the width without the final
space.
The only goal is to improve code readability: this enum class is strictly equivalent to a Boolean, with the same meaning as the previous is_xhtml arguments (arbitrary choice).
In several range-based for loops, implicit copies are made. Remove
that when possible, and try to shut converity up otherwise.
Fixes issues found by coverity.
- Check the state of the synchronize TeX output option of the document to enable or disable the LFUN for forward-search.
- write synctex macro to TeX source not only for PdfLaTeX