commit d21042299f8dc1812798b68f9a5596603ad61dd9
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Apr 13 11:36:10 2024 +0200

    Set cursor font after pasting to PassThru inset (#12592)
    
    (cherry picked from commit 09c72d7c8d3341ecc7ae2307b4355c592d9dcc1b)
---
 src/insets/InsetText.cpp | 6 ++++++
 status.24x               | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp
index d65cbf9f31..b8e65709a1 100644
--- a/src/insets/InsetText.cpp
+++ b/src/insets/InsetText.cpp
@@ -334,6 +334,12 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
                // attributes.
                // FIXME: Change only the pasted paragraphs
                fixParagraphsFont();
+               // This might be needed in general, but we currently
+               // only have evidence for PassThru (latex_font),
+               // see #12592
+               if (isPassThru())
+                       // assure current cursor font is latex
+                       cur.setCurrentFont();
                break;
 
        case LFUN_INSET_SPLIT:
diff --git a/status.24x b/status.24x
index 569bfb5ca9..c92a8495ea 100644
--- a/status.24x
+++ b/status.24x
@@ -52,6 +52,7 @@ What's new
 
 * DOCUMENT INPUT/OUTPUT
 
+- Set cursor font after pasting to PassThru (e.g., ERT) inset (bug 12592).
 
 
 * USER INTERFACE
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to