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.
If keymaps are activated and there is a secondary keymap but no
primary one, then the pointer to the active keymap was 0x0. This can't
be good.
Fixes bug #9685.
When entering an inset from the keyboard, setCurrentFont()
was not called and thus the cursor retained the font that was set
before. This could create strange behavior that could often go
unnoticed by the user.
It is easy to imagine many other situations similar to #9597 where
the user could trigger this bug.
Fixes bug #9597.
The upcoming Mac OS version 10.11 (El Capitan) will not allow TeX the installation of links inside the /usr directory anymore.
(cherry picked from commit c11c4fd767)
This made text in smallcaps+emph display as upright instead of plain
emph. There is no latex font for smallcaps + emph, but it is not a
reason for displaying it wrong.
Fixes bug #3519.
It turns out that it is always better using the copy of the MacroData
for updating the macro_ pointer to avoid problems related to the cursor
position.
This is a further amendment to 180ecbd7.
This can happen when a macro is copied and then the document where
it is defined is closed. In this case, the macro survives in the
cut stack but the the buffer pointer is dangling.
This commit is an amendment to 2a9f0733 so no status line is needed.
The symptom of the bug is that the preference could be incorrectly
displayed (based on the value of the statusbar preference).
This seems to have been a copy/paste mistake introduced in 214f7ed2.
(cherry picked from commit 5e7cbc8f2c)
* Fix crash when zooming after latex failed to generate any output for previews.
This was new in 2.1.4, so no status line is needed.
* Fix crash when copying macros with instant preview on.
* Fix typo causing to only account for the first char of a macro name
* Also check for macros as arguments of other macros
* Take into account macro redefinitions in the legacy route
* Take into account macros inside nested macro definitions
* Use the draft option for microtype instead of redefining \usepackage
* Make really sure to wait for previews after zoom changes
This is an amendment to previous commits, so no status line is needed.
The path argument of checkProg* was added to the PATH list in a nested
loop such that the list doubles in size each time the loop is executed,
thus also slowing down detection of missing programs.
Until now the regeneration process was starting as soon as the zoom scale
factor was changed. This was causing some glitches, especially if the zoom
was changed by the mouse wheel, as on each change the process was started
again and again making zoom changes painful and causing races such that
one could end up with the text at some zoom factor and the previews at
another one. After this commit, the regeneration is started only after
the zoom factor has been stable for about 1 second. In this way, one can
use the mouse wheel for changing back and forth the zoom factor at own's
heart desire without any slow down due to the regeneration process running
in the background. For those using previews with numbered math equations,
a nice possibility for getting the equations correctly numbered in sequence
(after removing or adding an equation) is using the shortcuts Alt+ and Alt-
in rapid sequence (less than a second between the keystrokes). Previously,
this would have triggered twice the regeneration, but now only once.
This is an amendment to 0e2ea9d4, so no status line is needed.
The patch also makes sure that only the macros actually used in a
math inset are included in the preview snippet. In this way, the
size of the tex file used for generating the previews does not
explode in the presence of lots of macros.
As JMarc notes on the ML, the referenced commit modifies a full
buffer just in the middle of a dispatch action.
Further, this commit lead to an assertion [1], although it is not
clear to me whether the root cause of the assertion is the commit
that is being reverted here, or one of the issues we have with
previews and macros.
This reverts commit 6ac04e21f4.
[1] http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg187921.html