Fix editor language modal.
This commit is contained in:
parent
2b72262b4f
commit
a0c61a53e1
|
@ -268,21 +268,16 @@ void editor_modal_tabsize(struct editor* editor, const char* tabsizestr)
|
||||||
void editor_modal_language(struct editor* editor, const char* language)
|
void editor_modal_language(struct editor* editor, const char* language)
|
||||||
{
|
{
|
||||||
if ( !language[0] || !strcmp(language, "none") )
|
if ( !language[0] || !strcmp(language, "none") )
|
||||||
{
|
|
||||||
editor->highlight_source = LANGUAGE_NONE;
|
editor->highlight_source = LANGUAGE_NONE;
|
||||||
return;
|
else if ( !strcmp(language, "c") || !strcmp(language, "c++") )
|
||||||
}
|
|
||||||
if ( !strcmp(language, "c") || !strcmp(language, "c++") )
|
|
||||||
{
|
|
||||||
editor->highlight_source = LANGUAGE_C_CXX;
|
editor->highlight_source = LANGUAGE_C_CXX;
|
||||||
return;
|
else if ( !strcmp(language, "diff") || !strcmp(language, "patch") )
|
||||||
}
|
|
||||||
if ( !strcmp(language, "diff") || !strcmp(language, "patch") )
|
|
||||||
{
|
|
||||||
editor->highlight_source = LANGUAGE_DIFF;
|
editor->highlight_source = LANGUAGE_DIFF;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
editor->modal_error = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
editor->modal_error = true;
|
|
||||||
editor_type_edit(editor);
|
editor_type_edit(editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue