1
0
forked from aniani/vim

patch 9.0.1359: too many "else if" statements in handling options

Problem:    Too many "else if" statements in handling options.
Solution:   Add more functions for handling option changes. (Yegappan
            Lakshmanan, closes #12060)
This commit is contained in:
Yegappan Lakshmanan
2023-02-27 12:47:47 +00:00
committed by Bram Moolenaar
parent 30a8447715
commit 5da901bb68
8 changed files with 188 additions and 61 deletions

View File

@@ -3088,11 +3088,10 @@ did_set_langmap(optset_T *args UNUSED)
}
if (to == NUL)
{
// TODO: Need to use errbuf argument for this error message
// and return it.
semsg(_(e_langmap_matching_character_missing_for_str),
transchar(from));
return NULL;
sprintf(args->os_errbuf,
_(e_langmap_matching_character_missing_for_str),
transchar(from));
return args->os_errbuf;
}
if (from >= 256)
@@ -3112,10 +3111,10 @@ did_set_langmap(optset_T *args UNUSED)
{
if (p[0] != ',')
{
// TODO: Need to use errbuf argument for this error
// message and return it.
semsg(_(e_langmap_extra_characters_after_semicolon_str), p);
return NULL;
sprintf(args->os_errbuf,
_(e_langmap_extra_characters_after_semicolon_str),
p);
return args->os_errbuf;
}
++p;
}