diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index f06425fc0b..cbf3d1a173 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -1300,7 +1300,7 @@ impl Editor { let editor_view_id = cx.view_id(); let display_map = cx.add_model(|cx| { let settings = settings::get::(cx); - let style = build_style(settings, get_field_editor_theme.as_deref(), None, &mode, cx); + let style = build_style(settings, get_field_editor_theme.as_deref(), None, cx); DisplayMap::new( buffer.clone(), style.text.font_id, @@ -1500,7 +1500,6 @@ impl Editor { settings::get::(cx), self.get_field_editor_theme.as_deref(), self.override_text_style.as_deref(), - &self.mode, cx, ) } @@ -8153,11 +8152,10 @@ fn build_style( settings: &ThemeSettings, get_field_editor_theme: Option<&GetFieldEditorTheme>, override_text_style: Option<&OverrideTextStyle>, - mode: &EditorMode, cx: &AppContext, ) -> EditorStyle { let font_cache = cx.font_cache(); - let mut line_height_scalar = settings.line_height(); + let line_height_scalar = settings.line_height(); let theme_id = settings.theme.meta.id; let mut theme = settings.theme.editor.clone(); let mut style = if let Some(get_field_editor_theme) = get_field_editor_theme { @@ -8168,14 +8166,6 @@ fn build_style( .container .background_color .unwrap_or_default(); - - line_height_scalar = match mode { - EditorMode::SingleLine | EditorMode::Full => line_height_scalar, - EditorMode::AutoHeight { .. } => cx - .font_cache() - .line_height(field_editor_theme.text.font_size), - }; - EditorStyle { text: field_editor_theme.text, placeholder_text: field_editor_theme.placeholder_text, diff --git a/crates/theme/src/theme_settings.rs b/crates/theme/src/theme_settings.rs index ab302a123a..b576391e14 100644 --- a/crates/theme/src/theme_settings.rs +++ b/crates/theme/src/theme_settings.rs @@ -13,7 +13,7 @@ use std::sync::Arc; use util::ResultExt as _; const MIN_FONT_SIZE: f32 = 6.0; -const MIN_LINE_HEIGHT: f32 = 1.1; +const MIN_LINE_HEIGHT: f32 = 1.0; #[derive(Clone, JsonSchema)] pub struct ThemeSettings {