Skip to content

Commit dc2d70b

Browse files
authored
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.
1 parent 3e95779 commit dc2d70b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

internal/action/defaults_darwin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ var infodefaults = map[string]string{
146146
"Backtab": "CycleAutocompleteBack",
147147
"Ctrl-z": "Undo",
148148
"Ctrl-y": "Redo",
149-
"Ctrl-c": "Copy|CopyLine",
150-
"Ctrl-x": "Cut|CutLine",
149+
"Ctrl-c": "Copy",
150+
"Ctrl-x": "Cut",
151151
"Ctrl-k": "CutLine",
152152
"Ctrl-v": "Paste",
153153
"Home": "StartOfTextToggle",

internal/action/defaults_other.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ var infodefaults = map[string]string{
149149
"Backtab": "CycleAutocompleteBack",
150150
"Ctrl-z": "Undo",
151151
"Ctrl-y": "Redo",
152-
"Ctrl-c": "Copy|CopyLine",
153-
"Ctrl-x": "Cut|CutLine",
152+
"Ctrl-c": "Copy",
153+
"Ctrl-x": "Cut",
154154
"Ctrl-k": "CutLine",
155155
"Ctrl-v": "Paste",
156156
"Home": "StartOfTextToggle",

runtime/help/keybindings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,8 @@ are given below:
699699
"Backtab": "CycleAutocompleteBack",
700700
"Ctrl-z": "Undo",
701701
"Ctrl-y": "Redo",
702-
"Ctrl-c": "Copy|CopyLine",
703-
"Ctrl-x": "Cut|CutLine",
702+
"Ctrl-c": "Copy",
703+
"Ctrl-x": "Cut",
704704
"Ctrl-k": "CutLine",
705705
"Ctrl-v": "Paste",
706706
"Home": "StartOfTextToggle",

0 commit comments

Comments
 (0)