mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
HackStudio: Use Syntax::Language instead of our own one
The one behavior difference here is that the statusbar used to display "Unknown" for unknown file types, and "Markdown" for md, but we now display "Plain Text" for all file types without syntax highlighters.
This commit is contained in:
parent
ffce6cc977
commit
08c1effc04
Notes:
sideshowbarker
2024-07-16 23:04:12 +09:00
Author: https://github.com/AtkinsSJ
Commit: 08c1effc04
Pull-request: https://github.com/SerenityOS/serenity/pull/17784
Reviewed-by: https://github.com/trflynn89 ✅
9 changed files with 35 additions and 160 deletions
|
@ -1614,7 +1614,7 @@ void HackStudioWidget::update_statusbar()
|
|||
}
|
||||
|
||||
m_statusbar->set_text(0, builder.to_deprecated_string());
|
||||
m_statusbar->set_text(1, current_editor_wrapper().editor().code_document().language_name());
|
||||
m_statusbar->set_text(1, Syntax::language_to_string(current_editor_wrapper().editor().code_document().language().value_or(Syntax::Language::PlainText)));
|
||||
m_statusbar->set_text(2, DeprecatedString::formatted("Ln {}, Col {}", current_editor().cursor().line() + 1, current_editor().cursor().column()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue