Add emptiness check for editor font family field
@@ -221,8 +221,12 @@ pub struct EditorConfig {
impl EditorConfig {
pub fn font_family(&self) -> FontFamily {
+ if self.font_family.is_empty() {
+ FontFamily::SYSTEM_UI
+ } else {
FontFamily::new_unchecked(self.font_family.clone())
}
+ }
pub fn inlay_hint_font_family(&self) -> FontFamily {
if self.inlay_hint_font_family.is_empty() {
