In case of search with format:
If the pattern contains language spec different to the document language
then do not ignore language setting.
Also renamed 'matchstart' in FindAndReplaceOptions to 'matchAtStart'
- Multicolumn now supports multiple paragraphs in non-fixed-width context.
- Multicolumn now supports valign in non-fixed-width context.
- varwidth columns now properly align horizontally and vertically.
Since commit c600906d92 all matches are match-results of examined strings starting
with a character of the same cursor depth, we can be sure to match the same string again if:
1.) the number of characters to the end of the examined strings match.
2.) the match-lengths are identical
The include inset has its own button_ object, that hides the button_
object of the InsetCommand parent. Remove that.
Remove the hand-made caching that uses the set_label_ boolean.
Let metrics() and draw() use the inherited methods. This requires to
use setBroken as needed and to implement inheritFont.
The use of InsetCommand::draw is what restores the hover effect.
Fixes bug #10415.
Set colors now apply to the active mode only. Matching reversed colors
are produced for the other mode if no color is assigned yet.
File format change.
1) Take care of different input if changed the search-mode (with/without format)
This amends ec387b6d
2) Make the braces used in text to be treated as single characters
e.g. transform '\braceleft' to some unicode value
3) Try to use '$' as 'end of sequence' in regex
We have to remove '}' and '\n' chars from the examined string
In format-search the chars '{' and '}' are understood as latex parentheses, which normally are not
part of text and are discarded.
Instead we fake them as if they were a char like \backslash or \guilemotright or such.
See https://marc.info/?l=lyx-devel&m=161058233016780&w=2.
Internal Buffers do not have TOCs associated with them, so we should
not try to update them. This fixes Kornel's crash, but there may be
other instances of the problem.
Makes the code with less exceptions
(no need to differentiate beteen use_regex and !use_regex)
Move the creation of regexes to own subroutine (Handles '#if QTSEARCH ... #endif')
Use cursor position differences instead of length of matched string. This is important for putSelectionAt()
Factor out the code that connects to a newly created dialog and then
use that also in GuiGraphics.
There must be many other dialogs that need this same treatment....
It turns out that the code is the same in texted ans mathed and that
whatever is done in InsetTabular is not useful.
This means that we do not need to deal Text::dispatch idiosyncrasies
(in particular forcing the cursor to be visible).
Fix bug #11225.
If a macro has only optionals and none is specified and a [ immediately
follows, we have to terminate the macro with {}, otherwise what follows
is taken to be an optional argument.
Fixes#11665.
The bookmarks are added as virtual elements in display Rows. Bookmarks
are shown with circled numbers. A new color "bookmarks" has been
added. Currently bookmark 0 (the return position) is not displayed
because it is very disturbing in practice.
To make this work, a new method BookmarksSection::bookmarksInPar
retuns the list of bookmarks in a paragraph along with their position.
Force redraw when using bookmark-save and bookmark-clear.
Fixes bug #2496.
This avoids generating % for HTML or DocBook: % indicates a comment in TeX, but not in XML, it's just a character. The snippet that is shown is therefore not valid.
As suggested there, we attach ourselves to the newly created inset,
if we in fact just created an inset. (This will only matter if Apply
was clicked, so the dialog is still open, but I did the calcuation
anyway, as it seems cheap enough.) This allows the user to modify
that inset (e.g., change the format) and also prevents another click
on Apply, or OK, from creating another dialog.
I've also removed the override of disconnectOnApply(). It does not
work, anyway, I think because it only works with GuiDialog, not with
DialogView-based dialogs.
Otherwise we are unable to distinguish text from latex commands.
For instance '\color{blue}' in text-part is normal text, while othervise
it defines following characters as being blue colored)
The ensuremath math inset derives from InsetMathNest, so that only the
first cell of a grid gets pasted. This patch makes it a fixed 1x1 grid
inset so that pasting works as in normal simple math hulls, i.e., all
cells are pasted, one after the other.
Fixes#11617.
At the moment, there is no support for plurals and capitalization.
A long comment explains why. Support could be added for that without
a format change.
The correct way of implementing this is at paragraph level. Once this
is clear, the implementation is straightforward.
Note that RtL is not handled correctly by the \lyxrightaddress macro.
Fixes bug #11918 and #8152.
When a paragraph is empty, it was not possible to query what the left
margin would be for an hypothetical second row.
Modify TextMetrics::leftMargin so that it does not test
whether position is after the last position of the paragraph.
Cosmetics: set the size of label to "small" for Abstract layout in
standard classes and reduce the spacing between label and text.
Fixes remainder of #11939.
Since the first row may be indented, it is necessary to find out what
the left margin would be on the next row (even if this next row does
not exst.
To this end, modify TextMetrics::leftMargin so that it does not test
whether position is after the last position of the paragraph.
Cosmetics: set the size of label to "small" for Abstract layout in
standard classes and reduce the spacing between label and text.
Fixes remainder of #11939.
References to environment variables embedded in a filename are expanded
and replaced by their value. However, if a variable does not exist, its
reference is simply erased from the filename, causing havoc (see #7801).
This has been like that since ever and cannot be changed, both for
backward compatibility and because this feature is currently used in
the Windows installer.
A possible backward compatible strategy is leaving as is the reference
to the environment variable (introduced by a $ sign) in the filename
if it does not exist. This is done in this patch, which also assumes
that an escape character is never used in a filename (inserting a $ in
the filename is easy, but I don't think one is able to easily insert
an escape character).
Use innermost nesting to start searches.
Some fine tuning to determine correct match.
(If the regex contains '(\S)\1' at the end, then this regex would match '}}',
but this is often the case at and of examined string. We have to disable this invalid match.
)