Skip to content

Commit

Permalink
Use monspace font for preview if syntax highlighting is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
luleyleo committed Dec 9, 2024
1 parent c26f0c9 commit 17dc773
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gnome/src/ui/preview/plain_preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ mod imp {
let lm = sourceview5::LanguageManager::default();
let language = lm.guess_language(Some(&file), None);
buffer.set_language(language.as_ref());
self.text_view.set_monospace(language.is_some());

// Place cursor on result line.
let mut cursor_position = buffer.start_iter();
Expand Down

0 comments on commit 17dc773

Please sign in to comment.