]> git.lyx.org Git - features.git/log
features.git
23 months agoAdd proper extension as needed in Save as and Export
Jean-Marc Lasgouttes [Sun, 17 Jul 2022 18:10:53 +0000 (20:10 +0200)]
Add proper extension as needed in Save as and Export

Introduce the new FileName method ensureExtension, which does the following:
* if the extension is already correct (in a case-insensitive way), do nothing.
* if it is not correct, add the extension to the file name.

This is different from changeExtension that will fail in a case where
the file contains dots, but not a real extension, like newfile2.1.

Use this new method in renameBuffer() and exportBufferAs().

Fixes bug #11008.

23 months agoFix for blue rectangles on math Style icon
Daniel Ramoeller [Tue, 2 Feb 2021 11:02:30 +0000 (12:02 +0100)]
Fix for blue rectangles on math Style icon

Fix for bug #12103.

23 months agoFix display of bindings for StaticMenuButton
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 16:39:04 +0000 (18:39 +0200)]
Fix display of bindings for StaticMenuButton

This requires to add a parameter to GuiToolbar::addItem so that it is
possble to make a difference between toolbar buttons and menu items.

The long-term solution is to rely on the menu backend for such things.

Fixes bug #12004.

23 months agoRevert "Fix display of bindings for View-other-formats dynamic toolbar menu"
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 11:36:12 +0000 (13:36 +0200)]
Revert "Fix display of bindings for View-other-formats dynamic toolbar menu"

This reverts commit e2e7794c7e3c6f5f9535789019d5e78ae1f676d9.

23 months agoFix display of bindings for View-other-formats dynamic toolbar menu
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 11:22:18 +0000 (13:22 +0200)]
Fix display of bindings for View-other-formats dynamic toolbar menu

Do it the same way as in menus. Also remove the tooltip, which is not used.

Fixes bug #12004.

23 months agoDisable flex-insert when inset does not exist
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 10:31:50 +0000 (12:31 +0200)]
Disable flex-insert when inset does not exist

This is useful when adding icons to the toolbar that insert insets not
availble by default (but provided by a module).

Fixes bug #11690.

23 months agoWhen pasting as LaTeX, honor textclass and modules
Jean-Marc Lasgouttes [Sun, 17 Jul 2022 22:50:33 +0000 (00:50 +0200)]
When pasting as LaTeX, honor textclass and modules

There are several small parts that are needed here:

* Implement LayoutModuleList::asString() that returns a comma-separated
  list of modules.

* in Converter::convert(), handle the new tokens $$c for the current
  textclass and $$m for the list of modules.

* in Buffer::importFile(), pass the current buffer as parameter instead
  of nullptr.

* in pasteClipboardText(), copy the parameters of the current buffer to
  the internal one used for importation, so that the textclass and
  modules information is available to convert().

* finally, modify configure.py to pass "-c $$c -m $$m" to tex2lyx for
  the latexclipoard->lyx converter.

Fixes bug #11312.

23 months agoAmend 2b24c03e: Do not override (Back)Tab in Adv F&R when it is useful
Kornel Benko [Mon, 18 Jul 2022 20:55:03 +0000 (22:55 +0200)]
Amend 2b24c03e: Do not override (Back)Tab in Adv F&R when it is useful

While testing we want to override 'Tab' in Adv F&R.
Unbinding 'Tab' seems to help, thanks to JMarc for the suggestion.

23 months agoFix forcing of text class for LaTeX snippets
Jean-Marc Lasgouttes [Sun, 17 Jul 2022 22:45:01 +0000 (00:45 +0200)]
Fix forcing of text class for LaTeX snippets

When the input document is not a full document, make sure that the -c
is taken into account.

23 months agoDo not override (Back)Tab in Adv F&R when it is useful
Jean-Marc Lasgouttes [Mon, 18 Jul 2022 10:02:28 +0000 (12:02 +0200)]
Do not override (Back)Tab in Adv F&R when it is useful

In Advanced Find and Replace, Tab can be used to move the focus from
Search field to the replace field. This is inconvenient when Tab has
another use, like completion.

To fix this, check that the function bound to Tab is disabled before switching focus.

The same is done for BackTab.

Fixes bug #11114.

23 months agoProperly draw changed Captions
Daniel Ramoeller [Wed, 15 Jun 2022 07:13:05 +0000 (09:13 +0200)]
Properly draw changed Captions

Fix for bug #12555.

23 months agoRename Row::right_boundary to end_boundary
Jean-Marc Lasgouttes [Sat, 16 Jul 2022 16:13:47 +0000 (18:13 +0200)]
Rename Row::right_boundary to end_boundary

This is more correct for RtL paragraphs.

23 months agoFixup b2a7b715a2c6: At least one 'HFill' should remain in the doc.
Jean-Marc Lasgouttes [Fri, 15 Jul 2022 22:33:55 +0000 (00:33 +0200)]
Fixup b2a7b715a2c6: At least one 'HFill' should remain in the doc.

23 months agoUpdate it.po
Enrico Forestieri [Thu, 14 Jul 2022 18:59:47 +0000 (20:59 +0200)]
Update it.po

23 months agoAvoid duplicates in minibuffer history
Jean-Marc Lasgouttes [Wed, 13 Jul 2022 14:56:10 +0000 (16:56 +0200)]
Avoid duplicates in minibuffer history

The removal of duplicates is done in LastCommandsSection::add and uses
the erase-remove idiom for performance.

Most of the patch is a cleanup of GuiCommandBuffer:

* remove history_ member, that was a copy of the session lastcommands
  vector. Use instead a wrapper history() around it and a addHistory
  wrapper for adding new entries.

* Make sure that there is only one place where commands are added to
  history. The code used to maintain a list for interactive editing,
  and a list for saving the session. They could be different in terms
  of leading/trailing spaces.

* [unrelated] remove command_ member, which is just a copy of
  LyXAction list of commmands. Use directly lyxaction instead.

23 months agoFix bug #12561
Enrico Forestieri [Wed, 13 Jul 2022 17:11:03 +0000 (19:11 +0200)]
Fix bug #12561

In mathed it is assumed that a labeled line is also implicitly numbered.
However, latex allows to label an equation without numbering it.
The label is then assigned the value of a nearby numbered one.
This commit drops the above mathed assumption in order to allow to import
valid latex code with a labeled but not numbered equation line.

The screen representation omits the line number and encloses the label
in square brackets for further differentiation. However, it is still not
possible to label an equation without numbering it using the GUI.

23 months agoFixup 95da2707: document getAlias.
Jean-Marc Lasgouttes [Wed, 13 Jul 2022 11:10:57 +0000 (13:10 +0200)]
Fixup 95da2707: document getAlias.

23 months agoAmend 95da2707 for Cmake: Check for icon aliases
Kornel Benko [Wed, 13 Jul 2022 07:36:45 +0000 (09:36 +0200)]
Amend 95da2707 for Cmake: Check for icon aliases

23 months agoStyle
Scott Kostyshak [Tue, 12 Jul 2022 21:55:04 +0000 (17:55 -0400)]
Style

23 months agoCheck for icon aliases
Daniel Ramoeller [Sun, 29 May 2022 13:59:34 +0000 (15:59 +0200)]
Check for icon aliases

The aliases are defined by a file in the (system or user) image
directory. The format is pretty simple: each line is like
  <str1> <str2>
Where every instance of <str1> will be replaced with <str2>.

Fixes bug #12509.

23 months agoAllow negative values for counters
Scott Kostyshak [Sat, 9 Jul 2022 20:40:22 +0000 (16:40 -0400)]
Allow negative values for counters

enumi, for example, can be negative.

2 years agoUpdate sk.po
Kornel Benko [Tue, 5 Jul 2022 06:58:40 +0000 (08:58 +0200)]
Update sk.po

2 years agoAmend
Scott Kostyshak [Mon, 4 Jul 2022 18:36:03 +0000 (14:36 -0400)]
Amend

2 years agoctests: log an upstream issue that wasted time
Scott Kostyshak [Mon, 4 Jul 2022 18:29:07 +0000 (14:29 -0400)]
ctests: log an upstream issue that wasted time

2 years agoFixup c30b0aac: protect against bad recursion
Jean-Marc Lasgouttes [Thu, 30 Jun 2022 12:13:57 +0000 (14:13 +0200)]
Fixup c30b0aac: protect against bad recursion

Adding this particular line created bad redraw interactions. See
thread on lyx-devel here:
https://marc.info/?l=lyx-devel&m=165648365808777&w=2

The code is reorganized a bit:

- the part of updateGUI() that (en|dis)abled elements is not moved to
  updateBottons ; the rest is renamed updateWorkAreas()

- only updateButtons is called now in eventFilter

- finally the recursion curse is fixed now in updateWorkAreas() by
  setting the old_buffer value _before_ calling copy_params. This
  avoid recursion if some bad update were to happen again.

2 years agoctests: log issue triggered by microtype update
Scott Kostyshak [Fri, 1 Jul 2022 14:17:28 +0000 (10:17 -0400)]
ctests: log issue triggered by microtype update

These tests were already inverted at 93066f13.

2 years agoRemove useless message (and avoid endless loop)
Jean-Marc Lasgouttes [Thu, 30 Jun 2022 09:10:31 +0000 (11:10 +0200)]
Remove useless message (and avoid endless loop)

When changing the document class, the message "Converting document to
new document class..." is shown in minibuffer. This message leads to
weird GUI update interactions with the FindAndReplace panel, and
ultimately infinite loops. It would only be useful if the conversion
took a long time.

See this thread for rreference:
https://marc.info/?l=lyx-devel&m=165648365808777&w=2

Therefore, just remove it.

2 years agoFix crash when dissolving a top level math inset
Jean-Marc Lasgouttes [Wed, 29 Jun 2022 20:52:16 +0000 (22:52 +0200)]
Fix crash when dissolving a top level math inset

This should be disabled not only for math hull, but also macro template.

Fixes bug #12562.

2 years agoFix ToC action when cursor is in adv. F&R pane
Jean-Marc Lasgouttes [Tue, 28 Jun 2022 21:17:05 +0000 (23:17 +0200)]
Fix ToC action when cursor is in adv. F&R pane

This important part is the last point, the rest is what is needed to
make it happen.

* implement (FindAndReplace|FindAndReplaceWidget)::hasWorkArea, that
  tell whether a work area is own by the advanced find & replace
  widget.

* factor out method find() from GuiView::findOrBuild.

* implement GuiView::hasVisibleWorkArea, that tells whether a workarea
  is visible in the view (current tab in a split or adv. f&r
  workarea).

* Finally, in TocWidget::sendDispatch, change the current workarea
  temporarily to the document workarea before dispatching the
  function. The code tries to be as careful as possible to handle all
  cases. The future will tell whether it is good enough.

2 years agowhitespace
Jean-Marc Lasgouttes [Tue, 28 Jun 2022 21:12:36 +0000 (23:12 +0200)]
whitespace

2 years agoFix gcc 13 compilation.
Pavel Sanda [Tue, 28 Jun 2022 08:26:42 +0000 (10:26 +0200)]
Fix gcc 13 compilation.

Spotted by Jose.

2 years agoFix line breaking thinko with Qt4
Jean-Marc Lasgouttes [Mon, 27 Jun 2022 14:09:42 +0000 (16:09 +0200)]
Fix line breaking thinko with Qt4

The test on whether to keep trailing spaces was inverted.

2 years agoctests: invert Hebrew tests failing with microtype
Scott Kostyshak [Sun, 26 Jun 2022 17:49:48 +0000 (13:49 -0400)]
ctests: invert Hebrew tests failing with microtype

The new microtype version seems to have caused failure of our Hebrew
Article (KOMA-Script) template.

2 years agoEurope_CV: use "utf8" instead of "utf8x"
Scott Kostyshak [Mon, 20 Jun 2022 20:41:03 +0000 (16:41 -0400)]
Europe_CV: use "utf8" instead of "utf8x"

uf8x is not recommended
(https://github.com/latex3/latex2e/issues/833), and thanks to Europe
CV's recent release, is no longer needed. See here:

  https://github.com/gsilano/EuropeCV/pull/30

Europe CV still fails on an updated TeX Live (see discussion on
hooks in the above discussion for why), but this commit at least
fixes the unicode-related errors.

2 years agoEurope_CV: update format
Scott Kostyshak [Mon, 20 Jun 2022 20:38:24 +0000 (16:38 -0400)]
Europe_CV: update format

2 years agoctests: invert American Geophysical Union tests
Scott Kostyshak [Mon, 20 Jun 2022 15:54:08 +0000 (11:54 -0400)]
ctests: invert American Geophysical Union tests

Our template was already marked as "Obsolete" since the class does
not appear to be maintained. The recent LaTeX2e update triggered a
problem in the .cls file that seems unlikely to be fixed.

2 years agoctests: invert a test that fails due to TeX issue
Scott Kostyshak [Sun, 19 Jun 2022 21:51:49 +0000 (17:51 -0400)]
ctests: invert a test that fails due to TeX issue

This issue was introduced (or triggered) in the recent LaTeX2e
release and is tracked here:

  https://github.com/latex3/latex2e/issues/833

2 years agoUpdate sk.po
Kornel Benko [Tue, 14 Jun 2022 16:07:35 +0000 (18:07 +0200)]
Update sk.po

2 years ago Hopefully last shortcut conflict
jpc [Tue, 14 Jun 2022 14:30:31 +0000 (16:30 +0200)]
 Hopefully last shortcut conflict

2 years ago Solve shortcut conflicts in std*.inc and fr.po
jpc [Tue, 14 Jun 2022 13:41:32 +0000 (15:41 +0200)]
 Solve shortcut conflicts in std*.inc and fr.po

2 years agoAmend [7efdbeaddf226/lyxgit]
Juergen Spitzmueller [Mon, 13 Jun 2022 14:12:16 +0000 (16:12 +0200)]
Amend [7efdbeaddf226/lyxgit]

We do not ship the nonfloat module, actually (I had a private copy).

2 years agode.po
Juergen Spitzmueller [Mon, 13 Jun 2022 14:11:09 +0000 (16:11 +0200)]
de.po

2 years agoBetter UI for captions outside floats (#12554)
Juergen Spitzmueller [Mon, 13 Jun 2022 11:22:58 +0000 (13:22 +0200)]
Better UI for captions outside floats (#12554)

2 years agoHonor key bindings for commit string
Jean-Marc Lasgouttes [Mon, 16 May 2022 20:16:53 +0000 (22:16 +0200)]
Honor key bindings for commit string

When the commit string from the inputMethodEvent can be interpreted as
characters bound to some action, dispatch this action instead of
inserting the string.

This is useful on an international keyboard, when diaresis+space gives
a plain double quote. It is better in this case to enter a smart
quote.

Adapted from a patch from Daniel Ramoeller <d.lyx@web.de>.

Fixes bug #10377.

2 years ago Update fr.po and a couple of shortcuts defined with non-existing letters
jpc [Mon, 13 Jun 2022 07:47:54 +0000 (09:47 +0200)]
Update fr.po and a couple of shortcuts defined with non-existing letters

2 years agoUpdate sk.po
Kornel Benko [Sun, 12 Jun 2022 13:48:34 +0000 (15:48 +0200)]
Update sk.po

2 years agoAmend b2a7b715a2c
Juergen Spitzmueller [Sun, 12 Jun 2022 12:24:20 +0000 (14:24 +0200)]
Amend b2a7b715a2c

2 years agode.po
Juergen Spitzmueller [Sun, 12 Jun 2022 12:21:05 +0000 (14:21 +0200)]
de.po

2 years agoMerge branch 'master' of git.lyx.org:lyx
Juergen Spitzmueller [Sun, 12 Jun 2022 11:35:52 +0000 (13:35 +0200)]
Merge branch 'master' of git.lyx.org:lyx

2 years agoMake space names more standard
Daniel Ramoeller [Wed, 8 Jun 2022 06:20:37 +0000 (08:20 +0200)]
Make space names more standard

Fix for bug #12547.

- "Interword" becomes "Normal"
- "Protected" becomes "Non-Breaking"

Plus a minor fixes to the "Horizontal Space Settings" dialog:
- Indicate that when "Non-Breaking" is disabled, the space will be non-breaking

2 years agoctests: log fix for an upstream LaTeX2e issue
Scott Kostyshak [Fri, 10 Jun 2022 13:15:41 +0000 (09:15 -0400)]
ctests: log fix for an upstream LaTeX2e issue

2 years agoctests: log a ModernCV issue with LaTeX2e pre-rel
Scott Kostyshak [Fri, 10 Jun 2022 13:15:34 +0000 (09:15 -0400)]
ctests: log a ModernCV issue with LaTeX2e pre-rel

ModernCV currently fails with the LaTeX2e pre-release that is
expected to be released very soon.

There is a pull request with a fix that will hopefully be merged
before the new release.

2 years agoAllow to break rows before and after label and index insets
Jean-Marc Lasgouttes [Thu, 9 Jun 2022 19:29:21 +0000 (21:29 +0200)]
Allow to break rows before and after label and index insets

Since they are elements that do not appear in output, there is no
reason to make breaking around them difficult.

2 years agoImplement CanBreakBefore row flag
Jean-Marc Lasgouttes [Thu, 9 Jun 2022 19:27:43 +0000 (21:27 +0200)]
Implement CanBreakBefore row flag

This is used for elements that allow to break a row before them
(similar to CanBreakAfter).

2 years agoFindAdv: Remove needless functions
Kornel Benko [Mon, 6 Jun 2022 11:18:08 +0000 (13:18 +0200)]
FindAdv: Remove needless functions

2 years ago Update fr.po
jpc [Sat, 4 Jun 2022 09:27:33 +0000 (11:27 +0200)]
      Update fr.po

2 years agoShow size of named spaces in dialog
Daniel Ramoeller [Thu, 2 Jun 2022 07:49:16 +0000 (09:49 +0200)]
Show size of named spaces in dialog

Fix for bug #12467.

2 years agoAmend 9d8dfe934ba: Check _all_ visited dirs
Kornel Benko [Thu, 2 Jun 2022 10:16:07 +0000 (12:16 +0200)]
Amend 9d8dfe934ba: Check _all_ visited dirs

2 years agoAlways validate a macro definition
Enrico Forestieri [Tue, 31 May 2022 20:13:52 +0000 (22:13 +0200)]
Always validate a macro definition

If a user-defined macro appears only in the argument of another
macro its definition is not validated and this leads to errors.

Fixes bug #12524.

2 years agoctests: log a confirmed upstream LaTeX2e issue
Scott Kostyshak [Tue, 31 May 2022 18:21:03 +0000 (14:21 -0400)]
ctests: log a confirmed upstream LaTeX2e issue

2 years agoFix documentation of Row::splitAt
Jean-Marc Lasgouttes [Tue, 31 May 2022 15:04:01 +0000 (17:04 +0200)]
Fix documentation of Row::splitAt

2 years agoFindAdv: Use modified check to determine if char is a word-char.
Kornel Benko [Sun, 29 May 2022 12:12:38 +0000 (14:12 +0200)]
FindAdv: Use modified check to determine if char is a word-char.

Amends 652ffc9c(3)

2 years agoGuard 'isNumberChar()' from char outside ucs4-range
Kornel Benko [Sun, 29 May 2022 12:08:36 +0000 (14:08 +0200)]
Guard 'isNumberChar()' from char outside ucs4-range

2 years agoIntroduce isNumberChar(char_type) function
Kornel Benko [Sun, 29 May 2022 10:06:18 +0000 (12:06 +0200)]
Introduce isNumberChar(char_type) function

In FindAdv we use Qt to interpret regular expressions.
Regex uses for instance '\w', '\d' etc.
'\d' finds not just '0-9' but also e.g. '߂' (Nko Digit Two: U+07c2)
'\w' includes also such numbers.

ATM, only FindAdv uses this function.

2 years agoForce absolute paths with qmake
Enrico Forestieri [Sun, 29 May 2022 09:57:58 +0000 (11:57 +0200)]
Force absolute paths with qmake

When generating makefiles, by default qmake tries to use
relative paths if it can replace at most 4 subdirs with "../"
to reach the QTDIR from the project file location.
This maximum can be changed by defining QMAKE_PROJECT_DEPTH, and
setting it to zero forces qmake to always use absolute paths.

This is necessary because the paths for includes and libs are
generated by a temporary project file located in a temporary dir
not corresponding to the real source dir.

2 years agoFindAdv: Amend 652ffc9c(2): Fix handling search for whole words if in mathed.
Kornel Benko [Sat, 28 May 2022 19:17:13 +0000 (21:17 +0200)]
FindAdv: Amend 652ffc9c(2): Fix handling search for whole words if in mathed.

Didn't know, how to get char-value cursor is pointing to.
Hopefully someone knows a better way as in this patch.

2 years agoForgot to pass third parameter
Juergen Spitzmueller [Sat, 28 May 2022 18:40:16 +0000 (20:40 +0200)]
Forgot to pass third parameter

2 years agoFix subfloat inset label (#11757)
Juergen Spitzmueller [Fri, 27 May 2022 07:26:40 +0000 (09:26 +0200)]
Fix subfloat inset label (#11757)

This was broken at 9b7ccbfc/lyxgit

2 years agoFindAdv: Amend 652ffc9c: have to check inTexted() before using Paragraph
Kornel Benko [Thu, 26 May 2022 15:17:49 +0000 (17:17 +0200)]
FindAdv: Amend 652ffc9c: have to check inTexted() before using Paragraph

2 years agoAmend b73ab025: Fix compilation with gcc-12
Kornel Benko [Thu, 26 May 2022 12:05:49 +0000 (14:05 +0200)]
Amend b73ab025: Fix compilation with gcc-12

2 years agoFindAdv: If searching for whole words, handle also the case that we are starting...
Kornel Benko [Thu, 26 May 2022 11:32:25 +0000 (13:32 +0200)]
FindAdv: If searching for whole words, handle also the case that we are starting in the mid of a word.

In this case we skip the undesired word-characters before starting the search.

There are still some inconsistencies between LyX and Qt of 'what counts as a word-character',
but too hard to resolve.

2 years agoFindAdv: Fix expression checking for 'int' as if it were bool
Kornel Benko [Wed, 25 May 2022 19:34:17 +0000 (21:34 +0200)]
FindAdv: Fix expression checking for 'int' as if it were bool

Since the element 'match_len' in class MatchResult is an integer,
the check 'if (!match(...).match_len))' is changed to
'if (match(...).match_len) <= 0)'

2 years agoFindAdv: Attempt to make the code less crabbed
Kornel Benko [Wed, 25 May 2022 18:43:49 +0000 (20:43 +0200)]
FindAdv: Attempt to make the code less crabbed

1.) The type of variable at_begin changes from bool to enum matchType
        true -> MatchStringAdv::MatchFromStart,
        false -> MatchStringAdv::MatchAnyPlace
2.) discard default parameter-values of
        MatchStringAdv::operator()
        MatchStringAdv::findAux()

2 years agoFindAdv:
Kornel Benko [Tue, 24 May 2022 21:41:31 +0000 (23:41 +0200)]
FindAdv:

1.) Changed arrays dept and closes to vector-type because of runtime error in UserGuide.lyx
    with a big paragraph (size > 8900 chars) contained too many opening parentheses
2.) Removed one creation 'textcyrillic'-key because it is later anyway created
3.) Most important (thanks to Scott who found the failure)
    Move the check if the found string really is part of MATH to
    the relevant place.
    Without this change the search using 'Search only in maths' will fail miserably.

2 years agoRevert "User Guide: add quotes to a PackageOptions command"
Scott Kostyshak [Tue, 24 May 2022 13:44:51 +0000 (09:44 -0400)]
Revert "User Guide: add quotes to a PackageOptions command"

Jürgen fixed the core issue at a77c84a0 so this workaround is not
needed anymore. It is more intuitive, and easier to remember, to not
use the double-quotes.

This reverts commit 67e9add6d0794c2b84bfedfbcee3cc7f3447a4ad.

2 years agoBufferParams::copyForAdvFR(): include quote style
Juergen Spitzmueller [Mon, 23 May 2022 12:32:01 +0000 (14:32 +0200)]
BufferParams::copyForAdvFR(): include quote style

2 years agoFindAdv: Do not search for accents if the command-parameter contains '\\'
Kornel Benko [Fri, 20 May 2022 10:46:26 +0000 (12:46 +0200)]
FindAdv: Do not search for accents if the command-parameter contains '\\'

The only exception are command-parameters '\\i', '\\imath' or '\\jmath'.

Example '\ddot{\\imath}'

2 years agoFixup d723b903: Fix slow display of large paragraphs
Jean-Marc Lasgouttes [Thu, 19 May 2022 14:03:57 +0000 (16:03 +0200)]
Fixup d723b903: Fix slow display of large paragraphs

When implementing multi-row string breaking, an extra createLine()
statement, which made sense in the original code, was kept by mistake.
This basically made the mechanism ineffective, because it created one
row with the correct length, plus a second one with all the remaining
text, which would have to be itself broken. This went undetected
because the display is still correct.

Additionally, this issue polluted the break cache to the extent that
the hit rate could be 0%.

Together, these two effects created a major slowdown with a document
containing a single ~30000 characters paragraph.

Fixes bug #12534.

2 years agopmprof: fix missing output in the 100% miss case
Jean-Marc Lasgouttes [Thu, 19 May 2022 09:35:39 +0000 (11:35 +0200)]
pmprof: fix missing output in the 100% miss case

Also update to the latest version of pmprof.

2 years agoAllow for several (comma-separated) PackageOptions
Juergen Spitzmueller [Thu, 19 May 2022 08:31:37 +0000 (10:31 +0200)]
Allow for several (comma-separated) PackageOptions

2 years agoUser Guide: add quotes to a PackageOptions command
Scott Kostyshak [Thu, 19 May 2022 01:09:58 +0000 (21:09 -0400)]
User Guide: add quotes to a PackageOptions command

The double-quotes are needed when there are two options.

Thanks to Jürgen.

2 years agoTypo in User Guide
Scott Kostyshak [Wed, 18 May 2022 01:24:05 +0000 (21:24 -0400)]
Typo in User Guide

"option1,option1" -> "option1,option2"

2 years agoFixup 5f8959d4: keep cursor font when there was no selection
Jean-Marc Lasgouttes [Tue, 17 May 2022 21:07:10 +0000 (23:07 +0200)]
Fixup 5f8959d4: keep cursor font when there was no selection

When toggleFree is called without a selection, the only result is to
change the cursor currentfont.

In the other cases (selection or implicit selection), we want to reset
the cursor font from the text font.

Fixes bug #12518.

2 years agoWord selection on mouse motion
Daniel Ramoeller [Mon, 16 May 2022 01:57:03 +0000 (03:57 +0200)]
Word selection on mouse motion

Partial fix for bug #9160.

2 years agoMake sure that current cursor font is updated when changing font
Jean-Marc Lasgouttes [Sun, 15 May 2022 21:14:02 +0000 (23:14 +0200)]
Make sure that current cursor font is updated when changing font

Fixes bug #12518.

2 years agoFindAdv: Amend(2) f845a4e9
Kornel Benko [Sat, 14 May 2022 12:49:52 +0000 (14:49 +0200)]
FindAdv: Amend(2) f845a4e9

Removing '\n' like in previous version with utf8-strings
This is needed e.g. for display math, which comes as
"\n\\[\n.....\n\\]\n"

2 years agoCtests: Adapt test 06 to changed shortcut
Kornel Benko [Sat, 14 May 2022 12:49:03 +0000 (14:49 +0200)]
Ctests: Adapt test 06 to changed shortcut

2 years agoFindAdv: Amend f845a4e9
Kornel Benko [Sat, 14 May 2022 07:51:23 +0000 (09:51 +0200)]
FindAdv: Amend f845a4e9

Also do not remove '\n' if in non-format-search mode. Otherwise
'\n' cannot be found with regex '\s'

2 years agoFindAdv: Do not handle stale empty latex commands if not in format-search mode
Kornel Benko [Sat, 14 May 2022 07:25:06 +0000 (09:25 +0200)]
FindAdv: Do not handle stale empty latex commands if not in format-search mode

In non-format-search mode, we do not have any latex commands here.

2 years agoFindAdv: Don't check on '\\\\\n' if ignoring format
Kornel Benko [Sat, 14 May 2022 06:56:00 +0000 (08:56 +0200)]
FindAdv: Don't check on '\\\\\n' if ignoring format

Since it can only happen if the lyx source contains two backslasches before
the inserted newline. And here it is the wrong case.

2 years agoFindAdv: Amend 6c735efb: Resolve some conflicts regex vs. math meaning of '$'
Kornel Benko [Fri, 13 May 2022 10:00:47 +0000 (12:00 +0200)]
FindAdv: Amend 6c735efb: Resolve some conflicts regex vs. math meaning of '$'

2 years agoFindAdv: In format search could '$'-char be interpreted as math-start.
Kornel Benko [Fri, 13 May 2022 07:30:30 +0000 (09:30 +0200)]
FindAdv: In format search could '$'-char be interpreted as math-start.

To handle this case, we use '\lyxdollar' string instead.

Also try to handle '\n' in the docstring directly instead in the
string already converted to utf8.
(The utf8-version is still there, but commented out)

2 years ago Update fr.po
jpc [Thu, 12 May 2022 12:44:16 +0000 (14:44 +0200)]
              Update fr.po

2 years agoFindAdv: Remove invalid closings
Kornel Benko [Thu, 12 May 2022 11:22:21 +0000 (13:22 +0200)]
FindAdv: Remove invalid closings

If the searched area contains deleted parts, there may be more closing
as opening parentheses in latex output. We have to remove them before
further processing.

2 years agoFindAdv: Use unicode for space where possible
Kornel Benko [Thu, 12 May 2022 11:20:24 +0000 (13:20 +0200)]
FindAdv: Use unicode for space where possible

Search for different space-types should be done with
regular expression '\s'

2 years agoUpdate sk.po
Kornel Benko [Thu, 12 May 2022 11:20:10 +0000 (13:20 +0200)]
Update sk.po

2 years agoUse "Auto" value on cursor width spinbox
Daniel Ramoeller [Sun, 27 Mar 2022 09:40:54 +0000 (11:40 +0200)]
Use "Auto" value on cursor width spinbox

Fix for bug #12515.

2 years agoFindAdv: Do not insert space for '\n' if there already are spaces around
Kornel Benko [Wed, 11 May 2022 15:42:50 +0000 (17:42 +0200)]
FindAdv: Do not insert space for '\n' if there already are spaces around

2 years agoFindAdv tests: update to new shortcuts
Kornel Benko [Tue, 10 May 2022 13:03:11 +0000 (15:03 +0200)]
FindAdv tests: update to new shortcuts

2 years agoUpdate sk.po
Kornel Benko [Tue, 10 May 2022 13:02:16 +0000 (15:02 +0200)]
Update sk.po