Fix default keybindings for Ctrl-c and Ctrl-x in command mode (#3973)

Micro doesn't support chained actions for command mode keybindings yet,
it only supports them for regular buffer keybindings. Whereas Ctrl-c and
Ctrl-x are bound by default to the chained actions Copy|CopyLine and
Cut|CutLine in both buffer mode and command mode, so in command mode
Ctrl-c and Ctrl-x don't work at all (with default keybindings).

Luckily CopyLine and CutLine would not be not very useful in command
mode anyway. So fix the issue by changing the default keybindings in
command mode to the simple non-chained actions Copy and Cut.
This commit is contained in:
Dmytro Maluka
2026-01-23 19:07:13 +01:00
committed by GitHub
parent 3e95779cf0
commit dc2d70bfe1
3 changed files with 6 additions and 6 deletions

View File

@@ -146,8 +146,8 @@ var infodefaults = map[string]string{
"Backtab": "CycleAutocompleteBack",
"Ctrl-z": "Undo",
"Ctrl-y": "Redo",
"Ctrl-c": "Copy|CopyLine",
"Ctrl-x": "Cut|CutLine",
"Ctrl-c": "Copy",
"Ctrl-x": "Cut",
"Ctrl-k": "CutLine",
"Ctrl-v": "Paste",
"Home": "StartOfTextToggle",

View File

@@ -149,8 +149,8 @@ var infodefaults = map[string]string{
"Backtab": "CycleAutocompleteBack",
"Ctrl-z": "Undo",
"Ctrl-y": "Redo",
"Ctrl-c": "Copy|CopyLine",
"Ctrl-x": "Cut|CutLine",
"Ctrl-c": "Copy",
"Ctrl-x": "Cut",
"Ctrl-k": "CutLine",
"Ctrl-v": "Paste",
"Home": "StartOfTextToggle",

View File

@@ -699,8 +699,8 @@ are given below:
"Backtab": "CycleAutocompleteBack",
"Ctrl-z": "Undo",
"Ctrl-y": "Redo",
"Ctrl-c": "Copy|CopyLine",
"Ctrl-x": "Cut|CutLine",
"Ctrl-c": "Copy",
"Ctrl-x": "Cut",
"Ctrl-k": "CutLine",
"Ctrl-v": "Paste",
"Home": "StartOfTextToggle",