| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11813)
https://github.com/vim/vim/commit/e8575988969579f9e1439181ae338b2ff74054a8
Skip list_alloc_with_items().
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
| |
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It isn't really useful to put anonymous enums only used as arguments to
functions calls in _defs.h headers, as they will only be used by a file
that calls those functions, which requires including a non-defs header.
Also move os_msg() and os_errmsg() back to message.h, as on Windows they
are actual functions instead of macros.
Also remove gettext.h and globals.h from private/helpers.h.
|
| |
|
|
|
|
|
|
|
| |
Enable all clang-tidy warnings by default instead of disabling them.
This ensures that we don't miss useful warnings on each clang-tidy
version upgrade. A drawback of this is that it will force us to either
fix or adjust the warnings as soon as possible.
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
|
|
|
| |
Co-authored-by: tmummert <doczook@gmx.de>
Co-authored-by: parikshit adhikari <parikshitadhikari@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of code inside HAVE_WORKING_LIBINTL doesn't really depend on a
"working libintl". For instance ex_language is also used for ":lang collate"
and ":lang time".
Also ":lang C" should not fail just because translations aren't available (it
just means use the default text).
References:
https://github.com/neovim/neovim/pull/1 2d00ead2e57653b771354a564f9a760c2ce0d18e
separate ifdefs for locale and gettext got merged together.
https://github.com/neovim/neovim/commit/8253e29971c54310434ee93d987a99994769d717
Unmotivated switcharoo of get_mess_env() logic. If available, get_locale_val(LC_MESSAGES) is the correct implementation.
|
| |
|
| |
|
|
|
|
|
|
| |
Merge locale.h into os/lang.h
Having a source file with the same name as a system header we use is
considered an anti-pattern.
|
|
|
|
|
|
|
|
|
|
| |
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a locale "en_US", "en" is the language and "US" is the region.
Before this change, we were too clever for our own good and tried to handle the
region as well. But if the macOS primary language is set to "English" and the
region to "Norway", we would end up with "en_NO", which is a locale that does
not exist.
Now we only take the language into account. Taking the example from above would
yield "en_US", which is a sensible fallback.
If the region is important to you, set $LANG and the more specific LC_*
variables in your shell config or alternatively use `:help :language`.
References https://github.com/neovim/neovim/issues/18292
|
|
|
|
| |
Closes #13533
|
|
|
|
|
|
|
|
|
| |
vim-patch:8.2.1757: Mac: default locale is lacking the encoding
Problem: Mac: default locale is lacking the encoding.
Solution: Add ".UTF-8 to the locale. (Yee Cheng Chin, closes vim/vim#7022)
https://github.com/vim/vim/commit/a5fe91e6dc610bc823bc3201e2c88179989b13fb
Cherry-pick test_environ.vim changes from patch 8.2.1432.
|
|
|
|
|
|
|
| |
ref #343
Though I don't see a strong benefit, it isn't too much of a burden, and
maybe avoids confusion in some cases.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The macOS preferences have a section called `Language & Region`. There is always
at least one language defined, the primary language.
CFLocaleCopyPreferredLanguages() returns the languages defined in that section,
the first element being the primary language.
Use the primary language in case CFLocaleCopyCurrent() returns NULL.
In the case that the above fallback does not work either, which is very
unlikely, log the error and continue with an empty $LANG.
References #9134
|
|
|
|
|
|
|
|
|
|
| |
This is a regression after PR #7704:
mac: Set $LANG based on the system locale
CFStringGetCStringPtr sometimes returns "lang_region" = NULL,
in this case CFStringGetCString is used instead,
which places output to "buf", but "buf" was not used
by the code.
|
| |
|
|
Unix's typical locale-related environment variables aren't always set
appropriately on a Mac. Instead of relying on them, query the locale
information using Mac specific APIs and then set $LANG appropriately for
the rest of nvim.
Closes #5873
|