]> git.lyx.org Git - lyx.git/log
lyx.git
18 hours agoFix display of math hull inset in RTL context master
Jean-Marc Lasgouttes [Thu, 16 May 2024 12:56:28 +0000 (14:56 +0200)]
Fix display of math hull inset in RTL context

The inversion of margin was done in the wrong way for RTL support.

25 hours agoAmend 207eaeee9071cb
Juergen Spitzmueller [Thu, 16 May 2024 05:33:29 +0000 (07:33 +0200)]
Amend 207eaeee9071cb

The upstream encoding needs to be updated after this routine
(see comment in OutputParams.h:183ff.)

38 hours agomumble
Juergen Spitzmueller [Wed, 15 May 2024 16:36:47 +0000 (18:36 +0200)]
mumble

43 hours ago# and % need to be escaped in hyperref URL as well
Juergen Spitzmueller [Wed, 15 May 2024 11:15:08 +0000 (13:15 +0200)]
# and % need to be escaped in hyperref URL as well

Also fix some lyx2lyx glitches

This hopefully fixes the test issues.

2 days agoUpdate tex2lyx tests
Scott Kostyshak [Wed, 15 May 2024 04:27:27 +0000 (00:27 -0400)]
Update tex2lyx tests

Needed after the file format change.

2 days agoAmend a716fb96b53447
Juergen Spitzmueller [Tue, 14 May 2024 11:54:00 +0000 (13:54 +0200)]
Amend a716fb96b53447

2 days agoDocument a716fb96b53447
Juergen Spitzmueller [Tue, 14 May 2024 11:38:16 +0000 (13:38 +0200)]
Document a716fb96b53447

2 days agoNeedCProtect -1 also for InsetLayouts
Juergen Spitzmueller [Tue, 14 May 2024 11:37:29 +0000 (13:37 +0200)]
NeedCProtect -1 also for InsetLayouts

2 days agoRevert false chunk
Juergen Spitzmueller [Tue, 14 May 2024 11:21:55 +0000 (13:21 +0200)]
Revert false chunk

2 days agoWhitespace
Juergen Spitzmueller [Tue, 14 May 2024 11:18:05 +0000 (13:18 +0200)]
Whitespace

3 days agoFix comment
Juergen Spitzmueller [Mon, 13 May 2024 08:26:45 +0000 (10:26 +0200)]
Fix comment

3 days agoProperly escape backslash in URLs with hyperref (#13012)
Juergen Spitzmueller [Mon, 13 May 2024 07:17:30 +0000 (09:17 +0200)]
Properly escape backslash in URLs with hyperref (#13012)

4 days agoHandle URL escaping in beamer frames
Juergen Spitzmueller [Mon, 13 May 2024 05:26:41 +0000 (07:26 +0200)]
Handle URL escaping in beamer frames

File format change -- this introduces the first LyX 2.5 format and
hence sets up the lyx2lyx machinery

5 days agoAmend 207eaeee9071cb
Juergen Spitzmueller [Sun, 12 May 2024 06:52:09 +0000 (08:52 +0200)]
Amend 207eaeee9071cb

FragileFrame, as opposed to normal frame, supports cprotect (and needs
it in the usual circumstances)

5 days agoDocument 207eaeee9071cb
Juergen Spitzmueller [Sun, 12 May 2024 05:54:04 +0000 (07:54 +0200)]
Document 207eaeee9071cb

5 days agoIntroduce NeedCProtect -1 layout option
Juergen Spitzmueller [Sun, 12 May 2024 05:52:16 +0000 (07:52 +0200)]
Introduce NeedCProtect -1 layout option

It turns out beamer frame does not allow \cprotect and errors if it is
used. Hence we need to prevent it in this context entirely.

5 days agoConsider CT in dash mechanism (#13062)
Juergen Spitzmueller [Sat, 11 May 2024 11:07:32 +0000 (13:07 +0200)]
Consider CT in dash mechanism (#13062)

7 days agoone less place where metrics have to be recomputed
Jean-Marc Lasgouttes [Thu, 9 May 2024 09:50:18 +0000 (11:50 +0200)]
one less place where metrics have to be recomputed

7 days agotypo
Jean-Marc Lasgouttes [Thu, 9 May 2024 09:45:55 +0000 (11:45 +0200)]
typo

9 days agoFixup 527984ed: fix initial screen size when using backing store
Jean-Marc Lasgouttes [Tue, 7 May 2024 10:01:34 +0000 (12:01 +0200)]
Fixup 527984ed: fix initial screen size when using backing store

When using a back store, it is obviously important to resize it
whenever the buffer view is resized. The new code path added in
527984ed skipped this part, so that the window was wrong when creating
a new window.

13 days agoFix up 5577e877: remove logic error
Jean-Marc Lasgouttes [Fri, 3 May 2024 12:28:30 +0000 (14:28 +0200)]
Fix up 5577e877: remove logic error

Commit 5577e877 introduces forceUpdateBuffer() to delay actual
updatBuffer() calls to a central place.

In Cursor::upDownInText, the updateNeeded flag (which triggers
Update::Force update flag) is set to true when Cursor::checkDepm
returns true. This is fine, except that checkDepm also leads to a
forceBufferUpdate() call.

The logic in the method was such that, when updateNeeded is already
true when entering, forceBufferUpdate() will be called even though
checkDepm did not request it.

Fixes a slight delay with selecting in MergedManual (the manual of
manuals).

2 weeks agoFixup 2660df9b99b80: missing stuff after moving Lexer to support/
Jean-Marc Lasgouttes [Wed, 1 May 2024 14:54:10 +0000 (16:54 +0200)]
Fixup 2660df9b99b80: missing stuff after moving Lexer to support/

2 weeks agoAvoid full metrics computation with Update:FitCursor
Jean-Marc Lasgouttes [Tue, 30 Apr 2024 13:02:16 +0000 (15:02 +0200)]
Avoid full metrics computation with Update:FitCursor

The handling of Update::FitCursor traditionnally recomputes all
metrics once or twice. Now that updateMetrics(false) ensures that all
paragraphs that require it have a metrics, we might as well use that.

Take this occasion to move handling of Update::SinglePar earlier,
before the check for Update::ForceDraw.

2 weeks agoFix up 'Reduce metrics updates from 4 to 1 when loading file'
Jean-Marc Lasgouttes [Mon, 29 Apr 2024 12:22:57 +0000 (14:22 +0200)]
Fix up 'Reduce metrics updates from 4 to 1 when loading file'

The missing metrics computation meant that, when loading a file, the
workarea would not be scrolled correctly to show the cursor.

The resizeBufferView does not create an additional metrics
computation, it just triggers it earlier.

2 weeks agoCMake: adapt to new location of Lexer
Scott Kostyshak [Sun, 28 Apr 2024 13:13:55 +0000 (09:13 -0400)]
CMake: adapt to new location of Lexer

Lexer is now in support/. See 2660df9b.

2 weeks agoRemove unused #include
Jean-Marc Lasgouttes [Sun, 28 Apr 2024 10:33:33 +0000 (12:33 +0200)]
Remove unused #include

2 weeks agoMove Lexer to support/ directory (and lyx::support namespace)
Jean-Marc Lasgouttes [Sat, 27 Apr 2024 22:24:46 +0000 (00:24 +0200)]
Move Lexer to support/ directory (and lyx::support namespace)

This requires quite a bit of trivial code shuffling.

3 weeks agoSet buffer when creating a MathData from parts of another one
Jean-Marc Lasgouttes [Thu, 25 Apr 2024 15:13:15 +0000 (17:13 +0200)]
Set buffer when creating a MathData from parts of another one

This is triggered by selecting part of an equation under Xcb platform
(x11). Indeed, the current selection has to be sent to the X11 server
and BufferView::requestSelection() is called. Eventually
cap::grabSelection() is the function that creates this partial
MathData object.

Fixes ticket #12947.

3 weeks agoSet buffer_ correctly when inseting a math macro over a selection
Jean-Marc Lasgouttes [Thu, 25 Apr 2024 12:28:10 +0000 (14:28 +0200)]
Set buffer_ correctly when inseting a math macro over a selection

The code that handles this special macro insertion (in
Cursor::mathMacroClose())) is very weird: it inserts the contents of
the macro _after_ the macro and later, since the macro is 'greedy', it
will eat this contents and put it in its first macro cell.

Does it make sense to you? It does not ake sense to me either. Anyway,
this is the point where one should make sure that the buffer is set.

Fixes ticket #12682.

3 weeks agotypo
Jean-Marc Lasgouttes [Thu, 25 Apr 2024 12:27:22 +0000 (14:27 +0200)]
typo

3 weeks agoAutotools: optimize with -Og when debugging
Jean-Marc Lasgouttes [Thu, 25 Apr 2024 10:30:48 +0000 (12:30 +0200)]
Autotools: optimize with -Og when debugging

When debug (-g) is enabled (default when compiling a development
version), the existing -O optimization level is not correct, since
many variables are optimized out when debugging.

Use -Og instead, and condition not on compiling a development version,
but on --enable-debug. This is the same by default, but it more
precise in our case.

3 weeks agoForce a Buffer * argument to math insets constructor
Jean-Marc Lasgouttes [Wed, 24 Apr 2024 13:07:15 +0000 (15:07 +0200)]
Force a Buffer * argument to math insets constructor

Make sure that math insets have a proper buffer. To this end, make the
Buffer* parameter of InsetMath mandatory and fix the compilation
errors that ensue.

3 weeks agoForce a Buffer * argument to MathData constructor
Jean-Marc Lasgouttes [Wed, 24 Apr 2024 10:04:23 +0000 (12:04 +0200)]
Force a Buffer * argument to MathData constructor

In order to ensure that MathData objects have a valid buffer, the
default MathData() constructor is deleted. This means that a buffer
shall be specified for each MathData object created.

This is fairly mechanical, actually. In particular, in most
InsetMathXxx cases, in MathData and in MathParser, the available
buffer_ member is used.

More specific cases:
- lyxfind.cpp takes the buffer from the Cursor

- calls to vector<MathData>::resize take an additional
  MathData(buffer_) parameter. There are cases where resize actually
  remove cells, and in this case clear() or even erase() have been
  used.

- in InsetMathMacroTemplate, the optional parameters of the
  constructors cannot be allowed anymore (a default value cannot
  depend on another parameter). Therefore there a now two constructors
  instead.

- in MathAutoCorrect.cpp, the MathData objects are not bound to a
  buffer, so that std::nullptr is used instead.

- in MathExtern, use a buffer when one is specified, std::nulptr
  instead.

3 weeks agoTry to make sure that math insets have a properly set buffer_ member
Jean-Marc Lasgouttes [Fri, 14 Oct 2022 20:42:21 +0000 (22:42 +0200)]
Try to make sure that math insets have a properly set buffer_ member

Set the buffer of contents that is added to a MathData object through
MathData::insert() (both versions)
MathData::push_back()
asArray()

Also in math macros, initialize look_ with the relevant buffer.

This reduces the number of insets hat do not have a proper buffer.

See #13050 for discussion of this issue.

3 weeks ago* metainfo.xml - homepage missing
Pavel Sanda [Sun, 21 Apr 2024 01:49:12 +0000 (03:49 +0200)]
* metainfo.xml - homepage missing

3 weeks agoWhitespace
Scott Kostyshak [Sat, 20 Apr 2024 18:22:07 +0000 (14:22 -0400)]
Whitespace

3 weeks agoUpdate sk.po
Kornel Benko [Sat, 20 Apr 2024 18:06:27 +0000 (20:06 +0200)]
Update sk.po

3 weeks agoCmake install: Forgotten to install tabletemplates.
Kornel Benko [Sat, 20 Apr 2024 17:33:25 +0000 (19:33 +0200)]
Cmake install: Forgotten to install tabletemplates.

3 weeks agode.po
Juergen Spitzmueller [Sat, 20 Apr 2024 15:06:00 +0000 (17:06 +0200)]
de.po

3 weeks agode.po
Juergen Spitzmueller [Sat, 20 Apr 2024 14:59:17 +0000 (16:59 +0200)]
de.po

3 weeks agoHandle the case of outdated chkconfig.ltx in user directory
Juergen Spitzmueller [Sat, 20 Apr 2024 12:57:12 +0000 (14:57 +0200)]
Handle the case of outdated chkconfig.ltx in user directory

3 weeks ago*UG - Add hint from users list
Pavel Sanda [Fri, 19 Apr 2024 22:24:44 +0000 (00:24 +0200)]
*UG - Add hint from users list

3 weeks agoSmall change
Jean-Marc Lasgouttes [Fri, 19 Apr 2024 16:21:26 +0000 (18:21 +0200)]
Small change

3 weeks agoSmall change
Jeân-Marc Lâsgöuttes [Fri, 19 Apr 2024 15:51:29 +0000 (17:51 +0200)]
Small change

3 weeks agosmall change
Jean-Marc Lasgouttes [Fri, 19 Apr 2024 15:24:10 +0000 (17:24 +0200)]
small change

3 weeks agosmall change
Jean-Marc Lasgouttes [Fri, 19 Apr 2024 15:16:00 +0000 (17:16 +0200)]
small change

4 weeks agoSet Buffer for MathData when creating macro view
Richard Kimberly Heck [Thu, 18 Apr 2024 22:22:52 +0000 (18:22 -0400)]
Set Buffer for MathData when creating macro view

4 weeks agoLittle bit more debug info for unset Buffer members.
Richard Kimberly Heck [Thu, 18 Apr 2024 20:03:14 +0000 (16:03 -0400)]
Little bit more debug info for unset Buffer members.

4 weeks ago* zh_CN.po (update from 2.4.x)
Pavel Sanda [Thu, 18 Apr 2024 22:20:02 +0000 (00:20 +0200)]
* zh_CN.po (update from 2.4.x)

4 weeks agoAlways repaint the gray area below main inset
Jean-Marc Lasgouttes [Tue, 16 Apr 2024 21:55:24 +0000 (23:55 +0200)]
Always repaint the gray area below main inset

Now that SingleParUpdate does not always lead to a full screen update
when the height of the paragraph changes (see new behavior of
updateMatrics(bool)), it is necessary to make sure that the grey area
below the main page is always repainted.

4 weeks agoSanitize cursors after a buffer has been reloaded
Jean-Marc Lasgouttes [Tue, 16 Apr 2024 09:45:09 +0000 (11:45 +0200)]
Sanitize cursors after a buffer has been reloaded

When a buffer is reloaded, its content may remain the same, but the
memory allocation is new, so that the inset pointers in cursors are
now wrong. This requires to sanitize the cursors held by the buffer
views.

Before the biginset branch, some full metrics computation call that is
now removed probably did that as a side effect. Now we have to be more
precise.

To this effect, introduce WorkAreaManager::sanitizeCursors() and use
it in Buffer::reload().

4 weeks agog-brief loads babel internally. So don't load it ourselves.
Juergen Spitzmueller [Tue, 16 Apr 2024 16:25:38 +0000 (18:25 +0200)]
g-brief loads babel internally. So don't load it ourselves.

This makes the class fully functional with non-TeX fonts (it uses
\babelfont for the purpose). Before, docs were compiling but the
output was wrong.

4 weeks agoDefer construction of temporary cursor.
Richard Kimberly Heck [Tue, 16 Apr 2024 16:15:50 +0000 (12:15 -0400)]
Defer construction of temporary cursor.

We were doing this on every mouse movement. I.e., for every single
pixel the mouse traverses. It can be expensive if there are a lot
of math insets.

4 weeks agoConvert $${python} placeholder for graphic conversions
José Matos [Sun, 14 Apr 2024 20:30:02 +0000 (21:30 +0100)]
Convert $${python} placeholder for graphic conversions

4 weeks agoSet cursor font after pasting to PassThru inset (#12592)
Juergen Spitzmueller [Sat, 13 Apr 2024 09:36:10 +0000 (11:36 +0200)]
Set cursor font after pasting to PassThru inset (#12592)

4 weeks agoFix indentation
Juergen Spitzmueller [Sat, 13 Apr 2024 08:11:24 +0000 (10:11 +0200)]
Fix indentation

4 weeks agoDisable language package choice if the class preloads a package
Juergen Spitzmueller [Sat, 13 Apr 2024 08:07:18 +0000 (10:07 +0200)]
Disable language package choice if the class preloads a package

4 weeks agogbrief-2 loads babel internally. So don't load it ourselves.
Juergen Spitzmueller [Sat, 13 Apr 2024 05:32:30 +0000 (07:32 +0200)]
gbrief-2 loads babel internally. So don't load it ourselves.

This makes the class fully functional with non-TeX fonts (it uses
\babelfont for the purpose). Before, docs were compiling but the
output was wrong.

4 weeks agoFix wrong position of conversion windows of the input method #11723, #13054
Koji Yokota [Fri, 29 Mar 2024 13:09:36 +0000 (22:09 +0900)]
Fix wrong position of conversion windows of the input method #11723, #13054

5 weeks ago#12641 document the Qt fix in release notes
Stephan Witt [Thu, 11 Apr 2024 21:26:26 +0000 (23:26 +0200)]
#12641 document the Qt fix in release notes

5 weeks agoAdd LyX-2.4 user directory to the list of candidates for copying on first run of...
Stephan Witt [Thu, 11 Apr 2024 16:31:51 +0000 (18:31 +0200)]
Add LyX-2.4 user directory to the list of candidates for copying on first run of LyX-2.5.

5 weeks agoImproved copy operation for user directory contents of previous major releases
Stephan Witt [Thu, 11 Apr 2024 16:30:29 +0000 (18:30 +0200)]
Improved copy operation for user directory contents of previous major releases

- avoid copying of configure.log
- avoid copying of chkconfig.ltx
  There is a report of a hang on first start of LyX with new major release.
  The removal of the chkconfig.ltx (leftover from early LyX versions) fixed the issue.

5 weeks agoUpdate credits
Pavel Sanda [Thu, 11 Apr 2024 07:42:29 +0000 (09:42 +0200)]
Update credits

5 weeks ago* zh_CN.po - update credits
Pavel Sanda [Thu, 11 Apr 2024 07:37:36 +0000 (09:37 +0200)]
* zh_CN.po - update credits

5 weeks agoupdate zh_CN translation
Jiaxu Zi [Wed, 10 Apr 2024 09:19:28 +0000 (17:19 +0800)]
update zh_CN translation

5 weeks agoUpdate Win installer for new dictionary links. Untested.
Pavel Sanda [Wed, 10 Apr 2024 19:13:41 +0000 (21:13 +0200)]
Update Win installer for new dictionary links. Untested.

5 weeks agoDocs - update URL for dictionaries after recent infra movements
Pavel Sanda [Wed, 10 Apr 2024 19:12:36 +0000 (21:12 +0200)]
Docs - update URL for dictionaries after recent infra movements

5 weeks agoUpdate sk.po
Kornel Benko [Wed, 10 Apr 2024 14:04:22 +0000 (16:04 +0200)]
Update sk.po

5 weeks agoFixup 'Avoid metrics computation on resize when width did not change'
Jean-Marc Lasgouttes [Wed, 10 Apr 2024 10:31:12 +0000 (12:31 +0200)]
Fixup 'Avoid metrics computation on resize when width did not change'

When the width of the window did not change, computing full metrics is
not necessary in BufferView::resize(), but it is better to redraw the
screen (especially with Wayland).

Typical use cases are when using M-x to open the minibuffer or going
in and out of an equation (which shows/hides the math toolbars).

5 weeks agoComment out too verbose debug output
Jean-Marc Lasgouttes [Wed, 10 Apr 2024 12:06:30 +0000 (14:06 +0200)]
Comment out too verbose debug output

5 weeks ago* layouttranslations.review, ack from Yitzhak.
Pavel Sanda [Sun, 7 Apr 2024 20:01:49 +0000 (22:01 +0200)]
* layouttranslations.review, ack from Yitzhak.

5 weeks agoFix compilation with msvc 2019
Jean-Marc Lasgouttes [Sun, 7 Apr 2024 18:41:13 +0000 (20:41 +0200)]
Fix compilation with msvc 2019

'uint' is not defined, 'unsigned int' is better.

5 weeks agoFix crash when deleting inset with backspace
Jean-Marc Lasgouttes [Sun, 7 Apr 2024 17:23:12 +0000 (19:23 +0200)]
Fix crash when deleting inset with backspace

See description here:
https://marc.info/?l=lyx-devel&m=171243435229412&w=2

cutSelectionHelper did not request a metrics update when the selection
was inner to a paragraph. The new code is better, but it was not
necessary before the biginset branch because of a full metrics
computation that hid this missing case.

5 weeks agoComment on 9198ed596580
Juergen Spitzmueller [Sun, 7 Apr 2024 04:24:37 +0000 (06:24 +0200)]
Comment on 9198ed596580

5 weeks agoCmake build: Check for needed qt6 required packages before using QT6
Kornel Benko [Sat, 6 Apr 2024 08:34:00 +0000 (10:34 +0200)]
Cmake build: Check for needed qt6 required packages before using QT6
compilation

5 weeks agoDocument 0d3d91c0551
Juergen Spitzmueller [Sat, 6 Apr 2024 07:58:31 +0000 (09:58 +0200)]
Document 0d3d91c0551

5 weeks agoFix assertion when pasting paragraph with insets in lyxrc.ct_markup_copied
Juergen Spitzmueller [Sat, 6 Apr 2024 07:47:22 +0000 (09:47 +0200)]
Fix assertion when pasting paragraph with insets in lyxrc.ct_markup_copied

This has to be done after the inset buffers have been initialized.

5 weeks agoImprove stats update times for buffer switches and toolbar toggles.
Pavel Sanda [Fri, 5 Apr 2024 20:59:07 +0000 (22:59 +0200)]
Improve stats update times for buffer switches and toolbar toggles.

5 weeks ago* quote-insert lfun description
Pavel Sanda [Fri, 5 Apr 2024 17:47:20 +0000 (19:47 +0200)]
* quote-insert lfun description

5 weeks agoAllow relative statistics values in statusbar.
Pavel Sanda [Fri, 5 Apr 2024 17:34:29 +0000 (19:34 +0200)]
Allow relative statistics values in statusbar.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg221311.html

5 weeks agoIndicate that, by default, mouse LFUN do not require a metrics update
Jean-Marc Lasgouttes [Mon, 27 Nov 2023 16:50:40 +0000 (17:50 +0100)]
Indicate that, by default, mouse LFUN do not require a metrics update

This is done easily in LyXAction.cpp. Remember that, by default, each
function is supposed to request a full metrics computation.

Part of bug #12297.

5 weeks agoAvoid full metrics computation when entering/leaving inset
Jean-Marc Lasgouttes [Mon, 27 Nov 2023 14:57:09 +0000 (15:57 +0100)]
Avoid full metrics computation when entering/leaving inset

Annotate function LFUN_FINISHED_xxx to indicate that they do not
require a full metrics computation.

Remove an "optimization" that meant that when the cursor changed
inset, a full metrics computation was requested.

Part of bug #12297

5 weeks agoAvoid some full metrics computations related to math previews
Jean-Marc Lasgouttes [Mon, 27 Nov 2023 14:13:56 +0000 (15:13 +0100)]
Avoid some full metrics computations related to math previews

When entering/leaving a math hull inset, a Update::Force flag was set,
in case the metrics of the inset would change because of a switch
between normal and preview representation.

When entering the inset, this code is now used only when the inset was
in preview mode.

In both cases, Update::Force is replaced with Update::SinglePar.

This requites in Text::dispatch to honor Update::SinglePar when it has
been set by some lfun, even when singleparupdate is false.

Part of bug #12297.

5 weeks agoAvoid metrics computation on resize when width did not change
Jean-Marc Lasgouttes [Mon, 27 Nov 2023 10:46:52 +0000 (11:46 +0100)]
Avoid metrics computation on resize when width did not change

Entering a math inset triggers a work area reize because the math
toobars appear automatically. However, by default these toolbars are
at the bottom of the screen and their presence does not change the
typesetting of paragraphs. Therefore it is useful to avoid a call to
updateMetrics() in the case where the width of the work area did not
change.

Part of bug #12297.

5 weeks agoReduce metrics updates from 4 to 1 when loading file
Jean-Marc Lasgouttes [Wed, 22 Nov 2023 11:07:51 +0000 (12:07 +0100)]
Reduce metrics updates from 4 to 1 when loading file

The number of metrics updates when loading file and showing it in a
new work area is unreasonable.

The first avoided call to updateMetrics() was an explicit resize in
BufferView::init(). Instead, an assertion is suppressed by exiting
early BufferView::processUpdateFlags() when BufferView::ready()
returns false. This is a new method introduced to factor in some
existing tests.

Two other metrics computations are avoided by setting the enclosing
View object busy() while creating the new tab. To make this work
properly, GuiWorkArea::scheduleRedraw has to return early in this
case.

When saving an unnamed document or invoking "Save as...", call
setBusy(false) earlier so that repainting occurs correctly.

Fixes bug #12976.

5 weeks agoUpdate PAINTING_ANALYSIS
Jean-Marc Lasgouttes [Mon, 20 Nov 2023 16:24:09 +0000 (17:24 +0100)]
Update PAINTING_ANALYSIS

5 weeks agoDo not compute metrics at each preview when loading file
Jean-Marc Lasgouttes [Thu, 21 Dec 2023 15:33:06 +0000 (16:33 +0100)]
Do not compute metrics at each preview when loading file

With the branch-test.lyx file from #12297, loading takes forever when
previews are activated. This is because each preview element causes a
full screen metrics recomputation.

This commit just skips these calls and only does one when all previews
have been obtained. As a result, computing the previews takes 1 second
instead of 25 seconds on branch-test.lyx.

Part of bug #12297.

5 weeks agoImprove the code that limits scrolling at top/bottom
Jean-Marc Lasgouttes [Fri, 17 Nov 2023 17:30:37 +0000 (18:30 +0100)]
Improve the code that limits scrolling at top/bottom

The most visible part of this commit is the move of part of
BufferView::updateMetrics to a new TextMetrics::updateMetrics. This
new method makes sure that metrics are known for all visible paragraphs
(starting from anchor), and that the positions of the paragraphs have
been recorded.

This method is called up to 3 times in BufferView::updateMetrics:
* unconditionally, to update all visible metrics,
* then, if the bottom of the document is visible and too high, after
  updating the anchor ypos,
* and similarly if the top of the document is visible and too low.

This fixes for example the case where one jumps to Section 5.3 at the
end of Tutorial and 'scroll_below_document' is false.

Some now redundant code is removed from BufferView::scrollToCursor.

The anchor-setting code in BufferView::draw is not clearly useful, but
left here just in case. It generates a debug warning, though.

Part of bug #12297.

5 weeks agoImplement quick scroll
Jean-Marc Lasgouttes [Mon, 24 Jul 2023 21:23:40 +0000 (23:23 +0200)]
Implement quick scroll

Replace flag parameter for updateMetrics() by a `force' boolean. When
it is false, the method keeps the metrics of paragraphs that are still
visible in WorkArea instead of computing everything afresh. All it has
to do is update their positions.

Add code to updateMetrics() to update the value of the anchor pit/ypos
(similar to the one in draw()).

Update processUpdateFlags() to use this when update flag is ForceDraw.

Modify scrollDocView() to just change the anchor paragraph position
when the scrolling operation would re-use some of the existing
paragraphs.

The time needed to update the metrics when scrolling with mouse in the
branch-test.lyx document is now divided by 20!

Part of bug #12297.

5 weeks agoIntroduce new helpers ParagraphMetrics::top/bottom
Jean-Marc Lasgouttes [Tue, 25 Jul 2023 14:31:13 +0000 (16:31 +0200)]
Introduce new helpers ParagraphMetrics::top/bottom

This avoids code with position/ascent/descent that is difficult to follow.

No change in function intended.

5 weeks agoIn the no-draw phase, do not cache the positions of not visible insets
Jean-Marc Lasgouttes [Mon, 24 Jul 2023 15:53:16 +0000 (17:53 +0200)]
In the no-draw phase, do not cache the positions of not visible insets

This can make a big difference for a very large branch that contains
lots of equations.

This is complementary to the previous patch, since instead of reducing
the number of calls to updatePosCache, we make it faster.

In the same test of scrolling with mouse wheel through the
branch-test.lyx document, one finds a 23% improvement for
BufferView::updateMetrics().

Part of bug #12297.

5 weeks agoRemove some redundant calls to updatePosCache
Jean-Marc Lasgouttes [Mon, 24 Jul 2023 13:35:16 +0000 (15:35 +0200)]
Remove some redundant calls to updatePosCache

The setting of insets positions was done twice in updateMetrics.
When one of the paragraph is a huge branch, this can be very expensive.

This leads to a 17% improvement on updateMetrics time on a scrolling test.

Part of bug #12297

5 weeks agoEnable Update::SinglePar in nested insets too
Jean-Marc Lasgouttes [Mon, 17 Jul 2023 12:43:29 +0000 (14:43 +0200)]
Enable Update::SinglePar in nested insets too

The idea of single par update is to try to re-break only the paragraph
containing the cursor (if this paragraph contains insets etc.,
re-breaking will recursively descend).

The existing single paragraph update mechanism was tailored to work
only at top level. Indeed changing a paragraph nested into an inset may
lead to larger changes.

This commit tries a rather naive approach that seems to work well: we
need a full redraw if either

1/ the height has changed
or
2/ the width has changed and it was equal to the text metrics width;
   the goal is to catch the case of a one-row inset that grows with
   its contents, but optimize the case of typing in a short paragraph
   part of a larger inset.

NOTE: if only the height has changed, then it should be
  possible to update all metrics at minimal cost. However,
  since this is risky, we do not try that right now.

Part of bug #12297.

5 weeks agoImplement undo coalescing
Jean-Marc Lasgouttes [Wed, 13 Jul 2022 23:02:28 +0000 (01:02 +0200)]
Implement undo coalescing

if the undo element we want to add only changes stuff that was already
modified by the previous one on undo stack (in the same group), then
skip it. There is nothing to gain in adding it to the stack.

The typical use case is when doing a search and replace in a large
document that does many replacements in each paragraph. In this case,
the same paragraph would be stored repeatedly.

Fixes bug #12564.

5 weeks ago#13049 add window activation for preferences to avoid it be hidden by main window...
Stephan Witt [Fri, 5 Apr 2024 08:47:49 +0000 (10:47 +0200)]
#13049 add window activation for preferences to avoid it be hidden by main window on mac after alert prompts

6 weeks agoUpdate update-po.sh script
Richard Kimberly Heck [Thu, 4 Apr 2024 21:09:16 +0000 (17:09 -0400)]
Update update-po.sh script

(cherry picked from commit b360b9ebf7c2b1bbb0fe674790ed78065c3780c0)

6 weeks agoDo not include <QDate> in InsetInfo.h
Jean-Marc Lasgouttes [Thu, 4 Apr 2024 15:35:54 +0000 (17:35 +0200)]
Do not include <QDate> in InsetInfo.h

This is used by getDate/getTime, which actually should not be
InsetInfoParams methods, but functions in anonymous namespace.

6 weeks agode.po
Juergen Spitzmueller [Thu, 4 Apr 2024 15:17:05 +0000 (17:17 +0200)]
de.po

6 weeks agofix typo in fr/Intro.lyx
Jean-Marc Lasgouttes [Thu, 4 Apr 2024 15:16:06 +0000 (17:16 +0200)]
fix typo in fr/Intro.lyx

6 weeks agoAllow for multiple accelerator alternatives
Juergen Spitzmueller [Thu, 4 Apr 2024 15:12:48 +0000 (17:12 +0200)]
Allow for multiple accelerator alternatives

This needs some testing before it could go to 2.4.x eventually