Compute a height from current font and current cell vertical
dimensions in MathData::metrics(), because this is where current font
is known.
Introduce BufferView::setCaretAscentDescent to remember this value.
This mechanism is not used for text because Cursor::current_font is
restored by undo, and the caret height would not be changed then. But
in principle it is doable.
The new code is much simpler: what it does is, after redrawing has
been done, to mark the cursor row as changed, so that it will be
repainted on next paint event.
This avoids some crashes at the price of possibly repainting the row
when it was not necessary.
The problem is that popping dialogs during reload can cause paint
events for which we are not ready. If this does not work, then we
can introduce a new flag, besides 'busy', for that case. But busy
does not seem to be used very widely, so hopefully this works.
This has the effect that inserting nomenclature entries does not
cut the selection (implicit or explicit) but rather copies it, which
seems to me to make a lot more sense. If anyone objects, let me know.
When the cursor is inside a subscript that may become empty, metrics
issues can happen. This patch fixes the issue, although it is not
clear to see what the problem is.
Still, requesting a metrics update also in the case where the macro
mode is canceled makes sense.
Fixes bug #11125.
Following a request by Günter, we consider the document fonts (only rm
for now) when selecting an appropriate font encoding.
See #9741
The new default font encoding setting "auto" does
* consider the font encoding needed by the language(s), which can now
have fallback alternatives
* Consider which font encoding is provided by the document font
Thus, cm now will result in OT1 fontenc, if the language can deal with
that.
The font_enc pref is ditched: it is no longer needed.
The automatism is still very basic and is subject to extension.
File format and prefs format change.
Before, the command
buffer-forall buffer-export
only exported one buffer for me. With async disabled, the command
works as documented and successfully exports all buffers.
Also before, I received an assertion from
buffer-forall buffer-close
which caused a SIGSEGV at #9422. Now, the action works as expected.
It surprises me a bit that the code is different in this case
from the case when EXPORT_in_THREAD is not set. I should check
to see if there's a problem in the other case, too.
Use the command as defined by Babel. This allows us to use the (more
advanced) Babel command if provided instead of rolling our own.
I add a dummy file format change in case it turns out we need to
do something here for old documents (e.g. with user preamble definitions)