mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
TextEditor: Auto-select C++ syntax highlighting for more extensions
This commit is contained in:
parent
82c38f6fdf
commit
629410b3d6
Notes:
sideshowbarker
2024-07-19 04:43:47 +09:00
Author: https://github.com/nico
Commit: 629410b3d6
Pull-request: https://github.com/SerenityOS/serenity/pull/2832
1 changed files with 2 additions and 1 deletions
|
@ -483,7 +483,8 @@ void TextEditorWidget::set_path(const LexicalPath& lexical_path)
|
|||
m_name = lexical_path.title();
|
||||
m_extension = lexical_path.extension();
|
||||
|
||||
if (m_extension == "cpp" || m_extension == "h") {
|
||||
if (m_extension == "c" || m_extension == "cc" || m_extension == "cxx" ||
|
||||
m_extension == "cpp" || m_extension == "h") {
|
||||
m_cpp_highlight->activate();
|
||||
} else if (m_extension == "js" || m_extension == "json") {
|
||||
m_js_highlight->activate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue