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

Before:

    Goto next buffer. [buffer-next]

After:

    Goto next buffer. [:buffer-next]
pull/4481/head^2
Michael Davis 2 years ago committed by GitHub
parent 6752c7d347
commit cefdface3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save