From: Scott Kostyshak Date: Thu, 6 Jul 2023 12:40:12 +0000 (-0400) Subject: Fix cursor font after collapsing inset (#12830) X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c4cdff5de22c683df4423dbc0950191294381cd1;p=features.git Fix cursor font after collapsing inset (#12830) If the cursor is in an inset, and it is closed (e.g., with ctrl + i, or inset-toggle), the cursor is moved outside of the inset, so the font must be reset. --- diff --git a/src/insets/InsetCollapsible.cpp b/src/insets/InsetCollapsible.cpp index e029671786..56d8ce8087 100644 --- a/src/insets/InsetCollapsible.cpp +++ b/src/insets/InsetCollapsible.cpp @@ -717,8 +717,11 @@ void InsetCollapsible::setStatus(Cursor & cur, CollapseStatus status) { status_ = status; setButtonLabel(); - if (status_ == Collapsed) + if (status_ == Collapsed) { cur.leaveInset(*this); + // if cursor was inside the inset, it was now moved outside (#12830) + cur.setCurrentFont(); + } }