From 68039b9d482be2de595ca057485b9b2a78ba80c4 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 16 Sep 2021 16:46:35 -0600 Subject: [PATCH] Remove font_family and font_size from editor::Snapshot We'll rely on the style struct instead. --- zed/src/editor.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/zed/src/editor.rs b/zed/src/editor.rs index af7f0e4db339246a96a9e3e21dc48c19222b2ce3..c27d91d3404d211ce43263cbc0896494c2c89258 100644 --- a/zed/src/editor.rs +++ b/zed/src/editor.rs @@ -17,10 +17,9 @@ pub use display_map::DisplayPoint; use display_map::*; pub use element::*; use gpui::{ - action, color::Color, font_cache::FamilyId, fonts::TextStyle, geometry::vector::Vector2F, + action, color::Color, fonts::TextStyle, geometry::vector::Vector2F, keymap::Binding, text_layout, AppContext, ClipboardItem, Element, ElementBox, Entity, - ModelHandle, MutableAppContext, RenderContext, Task, View, ViewContext, - WeakViewHandle, + ModelHandle, MutableAppContext, RenderContext, Task, View, ViewContext, WeakViewHandle, }; use postage::watch; use serde::{Deserialize, Serialize}; @@ -318,8 +317,6 @@ pub struct Snapshot { pub display_snapshot: DisplayMapSnapshot, pub placeholder_text: Option>, pub theme: Arc, - pub font_family: FamilyId, - pub font_size: f32, is_focused: bool, scroll_position: Vector2F, scroll_top_anchor: Anchor, @@ -436,8 +433,6 @@ impl Editor { scroll_top_anchor: self.scroll_top_anchor.clone(), theme: settings.theme.clone(), placeholder_text: self.placeholder_text.clone(), - font_family: settings.buffer_font_family, - font_size: settings.buffer_font_size, is_focused: self .handle .upgrade(cx)