Patch by Daniel Ramöller (racoon), with slight modifications of mine.
Fixes: #10062
(cherry picked from commit 81e4f8dfb610ae8e6a5cc79a869030b229587b26
with minor adaptations)
When selecting text, in some cases a DocIterator could be forwarded
to a (non-existant) paragraph after the end. The critical part of
this fix is to break the loop at the correct place. The following
are additional improvements:
- increase readability by defining a bool named "in_last_par"
- use cur.selectionEnd().pit() instead of cur.selectionEnd().paragraph().id()
- use it.lastpos() instead of it.paragraph().size()
This commit fixes a regression introduced by 23de5e5e, and reported
at #11204.
Thanks to Jürgen and JMarc.
(cherry picked from commit d12798759aeb7bae77bec63098fd81f8cc9e554b)
In the context menu for a selection, we now only show the options
"Accept Change" and "Reject Change" if there is actually a change in
the selection. Similarly, in the toolbar, the buttons are only
enabled when there is a change in the selection.
This fixes#10338.
(cherry picked from commit 23de5e5e195f8f76aea4760f0e6999a9a4174612)
Spaces are now conserved when they surround current cursor. Examples:
abc | def
becomes
abc | def
after DEPM and
abc |
is kept as it is.
Fixes ticket #11412.
(cherry picked from commit dff0c5729e6eec4c799f60171e4d0a377327ab10)
Enclose in braces an optional argument of a math macro when it
starts with an incomplete script inset or ends with a delimiter
size-modifier macro.
(cherry picked from commit 2dcb73002666001ff55067abab05f6ab4a5760d9)
The latter has the workarea font settings, which are not of interest
here.
Fixes: #11385
(cherry picked from commit 9705b8825172ff1158b7c1451eb1c0da214808a1)
We have to take into account that Buffer::updateBuffer can modify the document.
Fix bug #11292.
(cherry picked from commit 57feb0fed0c078903900aaea069c49207c8cb9ac)
Make MathData::setBuffer set the buffer of insets that it contains.
Remove corresponding code from InsetMathNest.
update the buffer() property in the following tabular-feature
actions : copy-row, add-row, copy-col, add-col.
(cherry picked from commit 837bcbb0433316ebe528b71e7c9952638ac1baee)
The backslash is the escape character used in our parser. Hence,
when used as a path separator on Windows, it has to be itself
escaped or the path enclosed in either double or single quotes.
Windows users are maybe trained to quote paths containing spaces
but not paths with backslashes. So, we automatically escape the
backslashes when they are not already enclosed in quotes.
(cherry picked from commit 4c9df62c6cb8168d8d129f2c5f6a16ba7e895f63)
https://marc.info/?l=lyx-devel&m=154458979925296&w=2
This is related to the fix for #9158 and the caching of bibfile
information. On Windows, it is incredibly slow to run kpsewhich,
which we do to check where files actually are, so as to get info
about them (e.g., timestamps). So we have started to cache that
as a map. The map is supposed to be invalidated when various
things happen, but an oversight was causing it to be invalidated
on every cut operation. This is because cutting uses a temporary
Buffer, and the operations on it were affecting the *global* cache
of biblio file info. (It makes sense to have a global cache, since
these files are not document-specific.) Basically, we have to update
the list of bibfiles in that temporary Buffer---but that is one of
the things that invalidated the cache. The solution is only to
invalidate the cache if the list of bibfiles has actually changed
(a sensible idea anyway). The only time that will happen in the
temporary Buffer is when the copied information contains a BibTeX
inset. That should be fairly rare.
Essentially, all characters are allowed in single-char macro names.
Part of #11158.
(cherry picked from commit 95bc273a597401f3ca9a43ed5d2d5db5626ae819)
The boost signal was sent synchronously, and so made the Qt signal to be posted
in FileMonitor::changed after the boost signal returned, so after the sender was
possibly destroyed.
The solution is to make the boost signal asynchronous using the Qt event loop.
Thanks to Scott Kostyshak for the report and MWE.
(cherry picked from commit 131f4b92bac3ecb75b47c266dfa3d8543bd4d578)
With Qt 5.11 at least, RtL text will be drawn RtL even when the
(undocumented) flag Qt::TextForceLeftToRight is applied to the
QTextLayout object. This creates selection issues for Hebrew text
marked as English.
The solution is to do the same as in breakAt_helper, that is prepend
the string with a direction override unicode character.
Doing this requires to introduce a TEXTLAYOUT_OFFSET constant that has
to be used wisely to account for this extra character.
Fixes bug #11284.
(cherry picked from commit 1bed76e2a1057ab2f3f33f01ec23956653265d4a)
As of LaTeX2e 2018, characters are made active earlier, which results
in new expansion problems.
Following a suggestion of Markus Kohm (pc) and the TL mailing list [1],
we embrace non-ASCII input paths in \detokenize. This relies on e-tex,
but I think we can assume this is nowadays available everywhere.
[1] http://tug.org/pipermail/tex-live/2018-May/041691.htmlFixes: #11146
(cherry picked from commit 8bd65041f2e22bf4c37219c7008a7e4e2bda2799)
(cherry picked from commit 5064c09e9f57a7ffb6082a7f8ec06c03ee9a0cef)
Update the Advanced F&R document class when switching buffers.
(cherry picked from commit 944b0ae55dd89e48bf8845c6d5e08a73bd1c4917)