Skip to content

Commit 86fcec2

Browse files
TubblesJoeKar
authored andcommitted
runtime: drop deprecated Ctrl-key constant names
tcell v3 removes the legacy KeyCtrlSpace / KeyCtrlLeftSq / KeyCtrlBackslash / KeyCtrlRightSq / KeyCtrlCarat / KeyCtrlUnderscore constants. Micro's bindings parser previously accepted the matching string names ("CtrlSpace", "CtrlLeftSq", ...) as aliases; those are now invalid and the parser emits a TermMessage warning when it sees one. Update the shipped comment plugin and the keybindings help page to use the supported forms. Assisted-by: Claude:claude-opus-4-7
1 parent f82419d commit 86fcec2

3 files changed

Lines changed: 3 additions & 9 deletions

File tree

runtime/help/keybindings.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ F61
452452
F62
453453
F63
454454
F64
455-
CtrlSpace
456455
Ctrl-a
457456
Ctrl-b
458457
Ctrl-c
@@ -479,11 +478,6 @@ Ctrl-w
479478
Ctrl-x
480479
Ctrl-y
481480
Ctrl-z
482-
CtrlLeftSq
483-
CtrlBackslash
484-
CtrlRightSq
485-
CtrlCarat
486-
CtrlUnderscore
487481
Backspace
488482
OldBackspace
489483
Tab

runtime/plugins/comment/comment.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,6 @@ end
217217
function init()
218218
config.MakeCommand("comment", comment, config.NoComplete)
219219
config.TryBindKey("Alt-/", "lua:comment.comment", false)
220-
config.TryBindKey("CtrlUnderscore", "lua:comment.comment", false)
220+
config.TryBindKey("Ctrl-_", "lua:comment.comment", false)
221221
config.AddRuntimeFile("comment", config.RTHelp, "help/comment.md")
222222
end

runtime/plugins/comment/help/comment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
The comment plugin provides auto commenting/uncommenting.
44
The default binding to comment/uncomment a line is `Alt-/`
5-
and `CtrlUnderscore`, which is equivalent in most terminals
6-
to `Ctrl-/`. You can easily modify that in your `bindings.json`
5+
and `Ctrl-_`, which is equivalent in most terminals to
6+
`Ctrl-/`. You can easily modify that in your `bindings.json`
77
file:
88

99
```json

0 commit comments

Comments
 (0)