Fix markdown preview font setting fallback values (#65437)

displayed when nothing is specifically selected for it.

## Summary

Fix for issue: #65300

Fixes an issue where the there was nothing displayed when no value was
selected for the markdown font family and markdown code font family
settings. See images below.

Current: 
<img width="819" height="697" alt="image"
src="https://github.com/user-attachments/assets/10bdf09e-f34c-41cb-8529-94d326c36db1"
/>

Fix: 


https://github.com/user-attachments/assets/b511b08d-0e5f-4de2-9f35-b878765a58ba


## Testing

See video above for test. I used Windows for my testing, but it should
be the same for all platforms.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior - not applicable.

Release Notes:

- Fixed an issue where no fonts would show for the markdown preview
configurations in the settings UI.
This commit is contained in:
Radhi Rasho 2026-10-10 14:19:31 +00:00 • committed by GitHub
parent f16f9652ec
commit 96984225ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1282,6 +1282,7 @@ fn appearance_page() -> SettingsPage {
.as_ref()? .as_ref()?
.font_family .font_family
.as_ref() .as_ref()
.or(settings_content.theme.ui_font_family.as_ref())
}, },
write: |settings_content, value, _| { write: |settings_content, value, _| {
settings_content settings_content
@ -1305,6 +1306,7 @@ fn appearance_page() -> SettingsPage {
.as_ref()? .as_ref()?
.code_font_family .code_font_family
.as_ref() .as_ref()
.or(settings_content.theme.buffer_font_family.as_ref())
}, },
write: |settings_content, value, _| { write: |settings_content, value, _| {
settings_content settings_content