Include colons for typable commands in command palette (#4495)

Before:

    Goto next buffer. [buffer-next]

After:

    Goto next buffer. [:buffer-next]
This commit is contained in:
Michael Davis 2022-10-28 07:42:40 -05:00 committed by GitHub
parent 6752c7d347
commit cefdface3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2443,8 +2443,8 @@ impl ui::menu::Item for MappableCommand {
match self {
MappableCommand::Typable { doc, name, .. } => match keymap.get(name as &String) {
Some(bindings) => format!("{} ({}) [{}]", doc, fmt_binding(bindings), name).into(),
None => format!("{} [{}]", doc, name).into(),
Some(bindings) => format!("{} ({}) [:{}]", doc, fmt_binding(bindings), name).into(),
None => format!("{} [:{}]", doc, name).into(),
},
MappableCommand::Static { doc, name, .. } => match keymap.get(*name) {
Some(bindings) => format!("{} ({}) [{}]", doc, fmt_binding(bindings), name).into(),