From 52a8aa7d09a7e4cca483e4842ba9531cae89b705 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 13 Jun 2024 11:04:10 +0200 Subject: [PATCH] FakeVim: Handle highlights for more split actions This fixes the issue at least for all usual FakeVim commands. It still breaks if the user directly uses the respective buttons on the editor toolbar, but that is a different story. Amends 5ad790d5c8f70b46c8603724e919fc3e30d10c60. Task-number: QTCREATORBUG-28914 Change-Id: I0a69d1f50eb6788099ac93bb529f72502cbd6ed0 Reviewed-by: hjk --- src/plugins/fakevim/fakevimplugin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 2ceb2ca30fe..6909c4d35a7 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1651,11 +1651,13 @@ void FakeVimPlugin::editorOpened(IEditor *editor) keepOnlyWindow(); else if (key == "P" || key == "") triggerAction(Core::Constants::GOTO_PREV_SPLIT); - else if (key == "S" || key == "") + else if (key == "S" || key == "") { triggerAction(Core::Constants::SPLIT); - else if (key == "V" || key == "") + updateAllHightLights(); + } else if (key == "V" || key == "") { triggerAction(Core::Constants::SPLIT_SIDE_BY_SIDE); - else if (key == "W" || key == "") + updateAllHightLights(); + } else if (key == "W" || key == "") triggerAction(Core::Constants::GOTO_NEXT_SPLIT); else if (key.contains("RIGHT") || key == "L" || key == "" || key == "") moveSomewhere(handler, &moveRightWeight, key == "" ? -1 : count);