From c1da27bbabf27b12aa812a46be0784403a1ea788 Mon Sep 17 00:00:00 2001 From: Matt Paras Date: Wed, 28 May 2025 06:10:57 -0700 Subject: [PATCH] add missing bufferline option --- helix-term/src/commands/engine/steel.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/helix-term/src/commands/engine/steel.rs b/helix-term/src/commands/engine/steel.rs index 075df0703..d0f218373 100644 --- a/helix-term/src/commands/engine/steel.rs +++ b/helix-term/src/commands/engine/steel.rs @@ -43,7 +43,6 @@ use std::{ borrow::Cow, collections::HashMap, error::Error, - ops::Deref, path::PathBuf, sync::{atomic::AtomicBool, Mutex, MutexGuard, RwLock, RwLockReadGuard}, time::Duration, @@ -2638,10 +2637,22 @@ impl HelixConfiguration { self.store_config(app_config); } - fn bufferline(&self, config: BufferLine) { + fn bufferline(&self, buffer_config: SteelVal) -> anyhow::Result<()> { + let config = match buffer_config { + SteelVal::StringV(s) | SteelVal::SymbolV(s) => match s.as_str() { + "never" => BufferLine::Never, + "always" => BufferLine::Always, + "multiple" => BufferLine::Multiple, + other => anyhow::bail!("Unrecognized bufferline option: {}", other), + }, + other => anyhow::bail!("Unrecognized bufferline option: {}", other), + }; + let mut app_config = self.load_config(); app_config.editor.bufferline = config; self.store_config(app_config); + + Ok(()) } fn indent_guides(&self, config: IndentGuidesConfig) {