From c4cdff5de22c683df4423dbc0950191294381cd1 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Thu, 6 Jul 2023 08:40:12 -0400 Subject: [PATCH] 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. --- src/insets/InsetCollapsible.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); + } } -- 2.39.5