[frameworks/ktexteditor] src/vimode/modes: vi-mode: Fix switching to vblock mode from another visual mode
Christoph Cullmann <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit b4b77b4c1989581f0bfa49bb6b78f9602ed80a68 by Christoph Cullmann, on behalf of Ismael Asensio.
Committed on 20/07/2026 at 21:22.
Pushed by cullmann into branch 'master'.
vi-mode: Fix switching to vblock mode from another visual mode
We need to add the <Ctrl-V> command also for visual modes.
Otherwise, pressing this shortcut on a visual mode will unexpectedly
fallback to Kate's default shortcut (pasting clipboard content)
M +1 -0 src/vimode/modes/visualvimode.cpp
https://invent.kde.org/frameworks/ktexteditor/-/commit/b4b77b4c1989581f0bfa49bb6b78f9602ed80a68
diff --git a/src/vimode/modes/visualvimode.cpp b/src/vimode/modes/visualvimode.cpp
index 2b6bbef32..4b1c71c91 100644
--- a/src/vimode/modes/visualvimode.cpp
+++ b/src/vimode/modes/visualvimode.cpp
@@ -274,6 +274,7 @@ const std::vector<Command> &VisualViMode::commands()
ADDCMD("ga", commandPrintCharacterCode, SHOULD_NOT_RESET),
ADDCMD("v", commandEnterVisualMode, SHOULD_NOT_RESET),
ADDCMD("V", commandEnterVisualLineMode, SHOULD_NOT_RESET),
+ ADDCMD("<c-v>", commandEnterVisualBlockMode, SHOULD_NOT_RESET),
ADDCMD("o", commandToOtherEnd, SHOULD_NOT_RESET | CAN_LAND_INSIDE_FOLDING_RANGE),
ADDCMD("=", commandAlignLines, SHOULD_NOT_RESET),
ADDCMD("~", commandChangeCase, IS_CHANGE),