From 90ab21e0e998ff9780bc9f475718a4af2a8361ef Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Sun, 2 Jun 2024 14:12:23 -0400 Subject: [PATCH 1/6] Fix table crash reported on Windows. (cherry picked from commit 3e796c680a11593bd09433be22bec45dcfe0d7a7) --- src/insets/InsetTabular.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 5242775e7f..74f55a2be7 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -808,6 +808,8 @@ void Tabular::deleteRow(row_type const row, bool const force) if (nrows() == 1) return; + LASSERT(row < nrows(), return); + // If we are in change tracking mode, and the row is not marked // as inserted by the same author, we do not delete it, but mark // it deleted. @@ -976,6 +978,8 @@ void Tabular::deleteColumn(col_type const col, bool const force) if (ncols() == 1) return; + LASSERT(col < ncols(), return); + // If we are in change tracking mode, and the column is not marked // as inserted by the same author, we do not delete it, but mark // it deleted. @@ -6779,8 +6783,11 @@ void InsetTabular::tabularFeatures(Cursor & cur, } } - for (row_type r = sel_row_start; r <= sel_row_end; ++r) + for (row_type r = sel_row_end; r >= sel_row_start; --r) { tabular.deleteRow(r); + if (r == 0) + break; + } if (sel_row_start >= tabular.nrows()) --sel_row_start; cur.idx() = tabular.cellIndex(sel_row_start, column); @@ -6802,8 +6809,11 @@ void InsetTabular::tabularFeatures(Cursor & cur, tabular.leftLine(tabular.cellIndex(r, 0))); } - for (col_type c = sel_col_start; c <= sel_col_end; ++c) + for (col_type c = sel_col_end; c >= sel_col_start; --c) { tabular.deleteColumn(c); + if (c == 0) + break; + } if (sel_col_start >= tabular.ncols()) --sel_col_start; cur.idx() = tabular.cellIndex(row, sel_col_start); From e0cd7c0129cb410b886e2314b25547610bfa7110 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Tue, 4 Jun 2024 11:25:58 -0400 Subject: [PATCH 2/6] Update README --- README | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README b/README index 3d8da5aeea..aa30c75d21 100644 --- a/README +++ b/README @@ -30,8 +30,8 @@ What do I need to run LyX? * Windows 7 or newer * Mac OS 10.13 or newer - A decent LaTeX2e installation (e.g. TeX Live for Linux, MikTeX for - Windows). + A decent LaTeX2e installation (e.g. TeXLive for Linux, TeXLive or + MikTeX for Windows, MacTeX for OSX). Python (2.7 or 3.5 and newer) to convert old LyX files and for helper scripts. @@ -42,7 +42,7 @@ How does the LyX version scheme work? number "2.x.y" indicates a stable release '2.x', maintenance release 'y'. In other words, LyX 2.3.0 was the first stable release in the 2.3-series of LyX. At the time of writing, the - latest maintenance release in the 2.3-series is LyX 2.3.7. + latest maintenance release in the 2.3-series is LyX 2.3.8. Please note that maintenance releases are designed primarily to fix bugs, and that the file format will _never_ change due to a @@ -56,8 +56,8 @@ How does the LyX version scheme work? series. To summarize, there are three possible types of file names that are of interest to normal users: - lyx-2.3.0.tar.gz -- stable release, first in the 2.3-series - lyx-2.2.4.tar.gz -- fourth maintenance release of LyX 2.2 + lyx-2.4.0.tar.gz -- stable release, first in the 2.4-series + lyx-2.3.4.tar.gz -- fourth maintenance release of LyX 2.3 lyx-2.4.0rc1.tar.gz -- potentially unstable release candidate Note that the goal is not parallel development as for the Linux @@ -71,10 +71,10 @@ How does the LyX version scheme work? If you get the source from Git, the version string will look like one of: - 2.3.1dev -- this is the stable branch on which maintenance - release 2.3.1 will eventually be tagged. - 2.4.0dev -- this is the main branch on which stable - release 2.4.0 will eventually be tagged. + 2.4.1dev -- this is the stable branch on which maintenance + release 2.4.1 will eventually be tagged. + 2.5.0dev -- this is the main branch on which stable + release 2.5.0 will eventually be tagged. What's new? From 13a6be1f9c4668dd661bc197df226b20e420e24b Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 6 Jun 2024 14:32:00 +0200 Subject: [PATCH 3/6] Do not draw appendix lines below en of document This bug is pretty old, but it was not visible because the grey area below the document would overwrite it. It would be better to close the frame at the end of the document, but this is for later. (cherry picked from commit 7acfbe0fccc729dcf5d910a4049b25e9943329fc) (cherry picked from commit c96d3a03400893f440dca7e68ed87bd70bea0b39) --- src/RowPainter.cpp | 4 ++-- status.24x | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp index 77e0ff67e6..19d83c13a3 100644 --- a/src/RowPainter.cpp +++ b/src/RowPainter.cpp @@ -313,8 +313,8 @@ void RowPainter::paintAppendix() const if (par_.params().startOfAppendix()) y += 2 * defaultRowHeight(); - pi_.pain.line(1, y, 1, yo_ + row_.height(), Color_appendix); - pi_.pain.line(tm_.width() - 2, y, tm_.width() - 2, yo_ + row_.height(), Color_appendix); + pi_.pain.line(1, y, 1, yo_ + row_.descent(), Color_appendix); + pi_.pain.line(tm_.width() - 2, y, tm_.width() - 2, yo_ + row_.descent(), Color_appendix); } diff --git a/status.24x b/status.24x index 154a255304..a62ec4aac1 100644 --- a/status.24x +++ b/status.24x @@ -43,6 +43,8 @@ What's new - fix display of equation numbers in right-to-left context. +- fix overflow of appendix red frame in document-bottom grey area. + * INTERNALS From 312dacb7f32ce5465e1fe3d5d7ac5e0b9b51e045 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 5 Jun 2024 23:05:22 +0200 Subject: [PATCH 4/6] Fixup 39c7199a: the code did not do what it was supposed to (cherry picked from commit 92ef555abde86466b7ca3c3401ab8132258fc497) --- src/insets/InsetLayout.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h index 7593d844d5..ffa0380f17 100644 --- a/src/insets/InsetLayout.h +++ b/src/insets/InsetLayout.h @@ -200,7 +200,7 @@ public: /// bool docbookrenderasimage() const { return docbookrenderasimage_; } /// - std::set required() const & { return required_; } + std::set const & required() const { return required_; } /// bool isMultiPar() const { return multipar_; } /// From d4bd0f9b1e0a47173585b52534d8a5bbd76d1cee Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 6 Jun 2024 06:58:33 +0200 Subject: [PATCH 5/6] Strip quotes from PackageOptions. Amends a77c84a0b4d5 (cherry picked from commit 1449fbf9ae3ecc70fbc7299f8901ecc31cdff1ab) --- src/TextClass.cpp | 2 +- status.24x | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TextClass.cpp b/src/TextClass.cpp index f6ec875167..57e382dcb9 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -693,7 +693,7 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt) string const pkg = lexrc.getString(); lexrc.eatLine(); string const options = lexrc.getString(); - package_options_[pkg] = options; + package_options_[pkg] = trim(options, "\""); break; } diff --git a/status.24x b/status.24x index a62ec4aac1..976c69baf6 100644 --- a/status.24x +++ b/status.24x @@ -45,8 +45,11 @@ What's new - fix overflow of appendix red frame in document-bottom grey area. + * INTERNALS +- Re-allow the use of quoted argument to PackageOptions layout tag. + * DOCUMENTATION AND LOCALIZATION From 9c16e25a84c3c1d813c0e4c2e5fa83e4965836ac Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Sat, 8 Jun 2024 11:54:44 -0400 Subject: [PATCH 6/6] Fix Python warning of invalid escape in lyx_pot.py Newer Python versions (e.g., Python 3.12.3) gave the following warning: po/lyx_pot.py:607: SyntaxWarning: invalid escape sequence '\w' An alternative fix would be to double the backslash, but that might be less readable than this fix. (cherry picked from commit 325f1429f83d7ce1d35404c3f99a31d19c0dbe45) --- po/lyx_pot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/lyx_pot.py b/po/lyx_pot.py index 665fdcddcf..76111bb71e 100755 --- a/po/lyx_pot.py +++ b/po/lyx_pot.py @@ -604,7 +604,7 @@ def encodings_l10n(input_files, output, base): output = io.open(output, 'w', encoding='utf_8', newline='\n') # assuming only one encodings file # Encoding utf8 utf8 "Unicode (utf8)" UTF-8 variable inputenc - reg = re.compile('Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)\[\]\/^"]*)"\s+["\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*') + reg = re.compile(r'Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)\[\]\/^"]*)"\s+["\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*') input = io.open(input_files[0], encoding='utf_8') for lineno, line in enumerate(input.readlines()): if not line.startswith('Encoding'):