FakeVim: Persist fakevim settings when enabling globally

Explicitly persist settings if enable FakeVim mode gets triggered
using the global shortcuts, otherwise we would enable the FakeVim
mode only temporarily and a restart of Qt Creator would use the
former mode again.

Fixes: QTCREATORBUG-29949
Change-Id: I457b32f8e5fe035e334ed51f358f374c85ab010b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2023-12-15 08:11:22 +01:00
parent d24e575278
commit 309d238f7b

View File

@@ -1048,6 +1048,7 @@ void FakeVimPluginPrivate::initialize()
INSTALL_HANDLER, Context(Core::Constants::C_GLOBAL), true);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+Y,Meta+Shift+Y")
: Tr::tr("Alt+Y,Alt+Y")));
connect(cmd->action(), &QAction::triggered, [this] { settings().writeSettings(); });
ActionContainer *advancedMenu =
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);