]> git.lyx.org Git - lyx.git/commitdiff
Set cursor font after pasting to PassThru inset (#12592)
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 13 Apr 2024 09:36:10 +0000 (11:36 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 13 Apr 2024 09:36:10 +0000 (11:36 +0200)
src/insets/InsetText.cpp

index d65cbf9f310dfee702a0a27675c4abaf2b220191..b8e65709a12325dcf256efee445a5a518172a08c 100644 (file)
@@ -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: