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
When unbinding a shortcut, it may happen that the exact definition of
the request is not known. A typical example it Tab, which is bound to
a complex command sequence.
In this case it is convenient to use the syntax
\unbind "Tab" "*"
To make this word, the special "*" value is translated to the
FuncRequest::unknown lfun and this value is considered specially in
several places.
This code was triggering the following warnings:
src/mathed/InsetMathHull.cpp:234:15: error: variable 'counters_to_save' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
const char * counters_to_save[] = {"section", "chapter"};
^
src/mathed/InsetMathHull.cpp:235:21: error: unused variable 'numcnts' [-Werror,-Wunused-const-variable]
unsigned int const numcnts = sizeof(counters_to_save)/sizeof(char *);
The original code was put in at 645f9fdf (and the comment at 8a226ec4).
This commit amends a65e12d6.