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 5ad790d5c8.

Task-number: QTCREATORBUG-28914
Change-Id: I0a69d1f50eb6788099ac93bb529f72502cbd6ed0
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2024-06-13 11:04:10 +02:00
parent 0c0ad6e7d8
commit 52a8aa7d09

View File

@@ -1651,11 +1651,13 @@ void FakeVimPlugin::editorOpened(IEditor *editor)
keepOnlyWindow(); keepOnlyWindow();
else if (key == "P" || key == "<C-P>") else if (key == "P" || key == "<C-P>")
triggerAction(Core::Constants::GOTO_PREV_SPLIT); triggerAction(Core::Constants::GOTO_PREV_SPLIT);
else if (key == "S" || key == "<C-S>") else if (key == "S" || key == "<C-S>") {
triggerAction(Core::Constants::SPLIT); triggerAction(Core::Constants::SPLIT);
else if (key == "V" || key == "<C-V>") updateAllHightLights();
} else if (key == "V" || key == "<C-V>") {
triggerAction(Core::Constants::SPLIT_SIDE_BY_SIDE); triggerAction(Core::Constants::SPLIT_SIDE_BY_SIDE);
else if (key == "W" || key == "<C-W>") updateAllHightLights();
} else if (key == "W" || key == "<C-W>")
triggerAction(Core::Constants::GOTO_NEXT_SPLIT); triggerAction(Core::Constants::GOTO_NEXT_SPLIT);
else if (key.contains("RIGHT") || key == "L" || key == "<S-L>" || key == "<C-L>") else if (key.contains("RIGHT") || key == "L" || key == "<S-L>" || key == "<C-L>")
moveSomewhere(handler, &moveRightWeight, key == "<S-L>" ? -1 : count); moveSomewhere(handler, &moveRightWeight, key == "<S-L>" ? -1 : count);