mirror of
https://github.com/neovim/neovim.git
synced 2025-10-12 04:46:10 +00:00
vim-patch:partial:9.0.1196: code is indented more than necessary (#27315)
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11813)
e857598896
Skip list_alloc_with_items().
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -80,17 +80,21 @@ static char *get_mess_env(void)
|
||||
return get_locale_val(LC_MESSAGES);
|
||||
#else
|
||||
char *p = (char *)os_getenv("LC_ALL");
|
||||
if (p != NULL) {
|
||||
return p;
|
||||
}
|
||||
|
||||
p = (char *)os_getenv("LC_MESSAGES");
|
||||
if (p != NULL) {
|
||||
return p;
|
||||
}
|
||||
|
||||
p = (char *)os_getenv("LANG");
|
||||
if (p != NULL && ascii_isdigit(*p)) {
|
||||
p = NULL; // ignore something like "1043"
|
||||
}
|
||||
if (p == NULL) {
|
||||
p = (char *)os_getenv("LC_MESSAGES");
|
||||
if (p == NULL) {
|
||||
p = (char *)os_getenv("LANG");
|
||||
if (p != NULL && ascii_isdigit(*p)) {
|
||||
p = NULL; // ignore something like "1043"
|
||||
}
|
||||
if (p == NULL) {
|
||||
p = get_locale_val(LC_CTYPE);
|
||||
}
|
||||
}
|
||||
p = get_locale_val(LC_CTYPE);
|
||||
}
|
||||
return p;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user