aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands/typed.rs4
-rw-r--r--helix-term/src/health.rs9
2 files changed, 7 insertions, 6 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 8b7f481b..c921f85b 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -891,8 +891,8 @@ fn setting(
}
let (key, arg) = (&args[0].to_lowercase(), &args[1]);
- let key_error = || anyhow::anyhow!("Unknown key `{key}`");
- let field_error = |_| anyhow::anyhow!("Could not parse field `{arg}`");
+ let key_error = || anyhow::anyhow!("Unknown key `{}`", key);
+ let field_error = |_| anyhow::anyhow!("Could not parse field `{}`", arg);
let mut config = serde_json::to_value(&cx.editor.config().clone()).unwrap();
let pointer = format!("/{}", key.replace('.', "/"));
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
index f13d35f0..2a02e118 100644
--- a/helix-term/src/health.rs
+++ b/helix-term/src/health.rs
@@ -89,10 +89,11 @@ pub fn languages_all() {
let column = |item: &str, color: Color| {
let data = format!(
- "{:column_width$}",
+ "{:width$}",
item.get(..column_width - 2)
- .map(|s| format!("{s}…"))
- .unwrap_or_else(|| item.to_string())
+ .map(|s| format!("{}…", s))
+ .unwrap_or_else(|| item.to_string()),
+ width = column_width,
)
.stylize()
.with(color);
@@ -158,7 +159,7 @@ pub fn language(lang_str: String) {
{
Some(l) => l,
None => {
- let msg = format!("Language '{lang_str}' not found");
+ let msg = format!("Language '{}' not found", lang_str);
println!("{}", msg.red());
let suggestions: Vec<&str> = syn_loader_conf
.language