]> git.lyx.org Git - lyx.git/blobdiff - src/Text2.cpp
Differentiate backups from autosave files (#12659)
[lyx.git] / src / Text2.cpp
index 82cc994be5347fc160d9840dac2b41e620f67a05..3dae072cecfa9e9132d396c16764f7f053f9dd08 100644 (file)
@@ -426,8 +426,12 @@ void Text::toggleFree(Cursor & cur, Font const & font, bool toggleall)
                cur.clearSelection();
                cur.top() = resetCursor;
                cur.resetAnchor();
-               cur.setCurrentFont();
        }
+
+       // if there was no selection at all, the point was to change cursor font.
+       // Otherwise, we want to reset it to local text font.
+       if (cur.selection() || implicitSelection)
+               cur.setCurrentFont();
 }