When the box has a special width, one should not consider that as a fixed width. Otherwise, due to implementation quirks, the width will be set on screen as 1 inch.
A better solution would be to actually set the width by taking in account the contents width, height ans total height. This is not very difficult, but I do not know whether it would workout well in the work area.
Fixes bug #10048.
What a selection spans several cells in mathed, and a deletion occurs though LFUN_CHAR_DELETE_FORWARD for example, only the case of a proper grid was handled. When no such grid exists, all cells between the first and the last index are cleared now.
Fixes part of bug #9747.
According to callgrind, the time taken to display the symbol dialog is spent in
updateSymbolsList. No longer translate strings for every symbol. This speeds
it up more or less by a factor two.
removeShortcut() restores default settings, therefore was used incorrectly. I
introduce deactivateShortcuts() which only removes assignments.
Clean up a bit the lack of view / model distinction (getting rid of the crashing
code at the same time).
Repair inconsistency of the selection in the "modify" case. (regression at
717d19d3c)
Make the test for existing bindings a bit more robust. (Not perfect yet.)
Focus on the item that has just been added/modified. (cosmetic)
(cherry-picked from 20a9c7a)
This concerns InsetPreview, InsetIPA and InsetMathHull.
Caching such a value is bad when opening the same buffer in two views.
In this case, it is not necessary to remember use_preview_ at all,
actually.
Also remove private member dim_ which is not used and remove some trailing whitespace.
Fixes bugs #9085 abd #9957.
Since the low-level version of tabular features is only called by the high-level one, it does not make sense to record undo there. It is much better to do it once in the high-level handler, rather than 37 times (yes!) at lower level when the tabular GUI calls tabular-feature with all the settings at once.
With large tables, this avoids to keep 37 copies of the table in Undo stack.
Newer boost versions use complicated type traits for boost::next and
boost::prior, which do not work with the RandomAccessList iterators.
The long term solution is to use std::next and std::prev, for now supply
simple replacements for compilers that do not support C++11 yet.
This is was cherry picked from b5963300 and 7e72c1d0d3.
Improve the test whether cursor has moved in Cursor::posVisLeft. The code for posVisRight had already been fixed for #5764 at 0730c923, but this replaces both tests by the proper == operator.
Fixes bug #9913.
whose children is also a child of another buffer, then try to close that
one.
The problem is that we do not check properly to make sure that the child
is not a child of some other buffer. Now we do.
(cherry picked from commit 0407364392)
whether a given child Buffer is also a child of some other parent.
Then do the releasing or resetting where this method is called.
There should be no change of behavior with this patch.
(cherry picked from commit e8ffb0c97a)
Gcc STL debugging feature asserts when swapping an object with itself. This happens in some cases with math grids that have only one column.
A quick review of other uses of swap() in the code base did not reveal any other dubious case.
Fixes bug #9902.
Although aa82c1ccfixed#9321, it broke a valid use case that was
reported by a user at #9785. Hopefully we can come up with a better
fix for #9321.
This reverts commit aa82c1cc19.
When importing TeX code like
%comment
TEXT
the LyX document currently becomes
[ERT %comment] TEXT
so that TEXT is now part of the comment.
Now output_comment adds a trailing newline if the token after the
comment is not a newline. Note that the newline that marks the end of
the comment has already been parsed at this point.
tex2lyx tests have been checked manually and updated.
Fixes ticket #9551.
The code in InsetTabular disables the toolbar icons and menu entries related to vertical lines.
The code in GuiTabular disables vertical lines in the Settings dialog.
Note that there was a bug in
GuiSetBorders::set(Left|Right|Top|Bottom)Enabled, where the borders
did not get drawn correctly.
Fixes bug #9816
PDF properties (Author, Title...) need to be quoted properly when writing (normal operation and tex2lyx). Also, reading them requires to use Lexer::getString() directly, because >> uses next(), which does not handle escapes.
Fixes bug #9830.
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.
(cherry-picked from 89342f2946
Conflicts:
src/mathed/MathData.cpp
)
The old code produced crashes with gcc5 caused by calling the copy
constructor (see https://bugzilla.redhat.com/show_bug.cgi?id=1260976).
This has been filed as gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67557
It is currently being marked as invalid (they claim the code is not valid and
produces undefined behaviour), but I don't think that this is correct.
Fortunately i does not matter for us whether the old code was valid or not,
since the new version is easier to understand and works with all compilers.
* Omit commented-out lines
* Properly escape backslash
* Do not allow non-space chars after delaration
* Allow blanks before # comment character
Fixes: #9746
This solves a few bugs related to the font not being set correctly.
For example, when putting a selection somewhere with
putSelectionAt(), the font was not reset so that before this commit
if the cursor was in an ERT, strange things could happen.
putSelectionAt() is notably used when highlighting the location
corresponding with a LaTeX error (GuiErrorList), when using find,
and when using the spellcheck. I could reproduce the bug using all
three of these.
Bug #9500 is an example of the type of bugs that this commit fixes.
(cherry picked from commit f8774a446b)
Currently, insets are notified that the cursor entered or leaved them
in Cursor::dispatch. This is not the case for lfuns which are handled
in BufferView.
Adding the proper code allows to fix many bugs where previews are not
updated correctly.
Fixes bug #6173.
Actually, the change is done only if the cursor language was the
document language already.
This fixes an trivial but annoying problem: create a new file (in
English), change language to your favourite language, then start to
write. Before this fix, the words come out in English, which does not
make sense.
Fixes bug #9586.