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.
Time will tell whether this is too expensive (because most equations
after this on will change too, unless equations are numbered by
section).
Related to bug #11535.
This patch simplifies and fixes the generation of previews with
numbering. Instead of saving the counter values (which is complicated
and error prone), the \thequation macro is set to the numbers_ string
which has been computed by updateBuffer for screen display.
Harcoding the number in the formula means that two equations with
different numbers have different previews, which is the subject of the
bug.
The special code for saving counters in updateBuffer and outputing
them in preparePreview from 645f9fdf (ticket #6894) is removed and
replaced by this simpler approach.
This fixes ticket #11535.
The module subequation allows to number equations in the "Subfigure"
inset to be numbered (1a), (1b), (1c), etc.
To implement this on screen, we need to redefine temporarily the
"equation" counter to use this different numbering.
To this end, implement Counters::copy method that can be used to
backup full counter definitions.
Fixes bug #12567.
This patch simplifies and fixes the generation of previews with
numbering. Instead of saving the counter values (which is complicated
and error prone), the \thequation macro is set to the numbers_ string
which has been computed by updateBuffer for screen display.
Harcoding the number in the formula means that two equations with
different numbers have different previews, which is the subject of the
bug.
The special code for saving counters in updateBuffer and putputing
them in preparePreview from 645f9fdf (ticket #6894) is removed and
replaced by this simpler approach.
This fixes ticket #11535.
The module subequation allows to number equations in the "Subfigure"
inset to be numbered (1a), (1b), (1c), etc.
To implement this on screen, we need to redefine temporarily the
"equation" counter to use this different numbering.
To this end, implement Counters::copy method that can be used to
backup full counter definitions.
Fixes bug #12567.
The layout from the paste content is adopted only if
- the paragraph is empty (ie. empty after the selection has been
erased) and Standard or Plain Layout, or
- empty and multiple lines are pasted, or
- multiple lines are pasted at the beginning of a paragraph
As for what other applications do:
- MS Word decides the adoption of a layout depending on whether the end of line
character is copied
- Libre Writer adopts the paste content layout only if the paragraph is empty
(otherwise it makes *all* pasted paragraph the target layout)
In LyX, as in Libre Writer, one cannot copy the end of line character by
selecting a single line. However, the Libre Writer solution is problematic
because one always has to make sure that a paragraph is in Standard layout if
one wants to paste several lines with their source layout. The implemented
behaviour differs from Libre Writer in that the source format is kept when end
of line characters are pasted, i.e. several lines are pasted, and hence does
what MS Word does in that situation.
Fix for bug #11023: Copy and paste from one list into another often leads to
undesired result.
Introduce the new FileName method ensureExtension, which does the following:
* if the extension is already correct (in a case-insensitive way), do nothing.
* if it is not correct, add the extension to the file name.
This is different from changeExtension that will fail in a case where
the file contains dots, but not a real extension, like newfile2.1.
Use this new method in renameBuffer() and exportBufferAs().
Fixes bug #11008.
This requires to add a parameter to GuiToolbar::addItem so that it is
possble to make a difference between toolbar buttons and menu items.
The long-term solution is to rely on the menu backend for such things.
Fixes bug #12004.