commit cd2ea8bc889f5085b19df9817f53d33df87ec54d
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Oct 21 08:29:35 2026 +0200

    Add missing buffer update in InsetTabular::pasteClipboard()
    
    See #13377
---
 src/insets/InsetTabular.cpp | 4 ++++
 status.25x                  | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 124c389e19..6b5882ef70 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -8230,6 +8230,10 @@ bool InsetTabular::pasteClipboard(Cursor & cur)
        }
        // amend cursor position if cols have been appended
        cur.idx() += actrow * (tabular.ncols() - oldncols);
+       // The pasted cells are new insets whose Text has no macro context
+       // position yet (set in Buffer::updateBuffer), so an update is needed
+       // before the next metrics pass.
+       cur.forceBufferUpdate();
        return true;
 }
 
diff --git a/status.25x b/status.25x
index 53c4307555..bb2ce4fd0a 100644
--- a/status.25x
+++ b/status.25x
@@ -76,6 +76,8 @@ What's new
 
 - Use sensible default if no LabelString is provided in InsetLayout for branch.
 
+- Fix assertion when pasting multiple cells (see bug 13377).
+
 
 * INTERNALS
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to