mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix editor language modal.
This commit is contained in:
parent
2b72262b4f
commit
a0c61a53e1
1 changed files with 5 additions and 10 deletions
|
@ -268,21 +268,16 @@ void editor_modal_tabsize(struct editor* editor, const char* tabsizestr)
|
|||
void editor_modal_language(struct editor* editor, const char* language)
|
||||
{
|
||||
if ( !language[0] || !strcmp(language, "none") )
|
||||
{
|
||||
editor->highlight_source = LANGUAGE_NONE;
|
||||
return;
|
||||
}
|
||||
if ( !strcmp(language, "c") || !strcmp(language, "c++") )
|
||||
{
|
||||
else if ( !strcmp(language, "c") || !strcmp(language, "c++") )
|
||||
editor->highlight_source = LANGUAGE_C_CXX;
|
||||
return;
|
||||
}
|
||||
if ( !strcmp(language, "diff") || !strcmp(language, "patch") )
|
||||
{
|
||||
else if ( !strcmp(language, "diff") || !strcmp(language, "patch") )
|
||||
editor->highlight_source = LANGUAGE_DIFF;
|
||||
else
|
||||
{
|
||||
editor->modal_error = true;
|
||||
return;
|
||||
}
|
||||
editor->modal_error = true;
|
||||
editor_type_edit(editor);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue