Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/ui/syntax_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ impl SyntaxText {
scope_time!("syntax_highlighting.0");
let plain_text = || SYNTAX_SET.find_syntax_plain_text();
let syntax = SYNTAX_SET
.find_syntax_for_file(
file_path.to_str().unwrap_or_default(),
)
.find_syntax_for_file(file_path)
.unwrap_or_else(|e| {
log::error!("Could not read the file to detect its syntax: {e}");
Some(plain_text())
Expand Down