mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
Change to use VV_PROGPATH instead os_exepath()
This commit is contained in:
@@ -713,14 +713,10 @@ static void init_locale(void)
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
char localepath[MAXPATHL] = { 0 };
|
char localepath[MAXPATHL] = { 0 };
|
||||||
char *exepath = localepath;
|
snprintf(localepath, sizeof(localepath), "%s", get_vim_var_str(VV_PROGPATH));
|
||||||
size_t exepathlen = MAXPATHL;
|
char *tail = (char *)path_tail_with_sep((char_u *)localepath);
|
||||||
if (os_exepath(exepath, &exepathlen) != 0) {
|
|
||||||
path_guess_exepath(argv0 ? argv0 : "nvim", exepath, sizeof(exepath));
|
|
||||||
}
|
|
||||||
char *tail = (char *)path_tail_with_sep((char_u *)exepath);
|
|
||||||
*tail = NUL;
|
*tail = NUL;
|
||||||
tail = (char *)path_tail((char_u *)exepath);
|
tail = (char *)path_tail((char_u *)localepath);
|
||||||
xstrlcpy(tail, "share/locale",
|
xstrlcpy(tail, "share/locale",
|
||||||
sizeof(localepath) - (size_t)(tail - localepath));
|
sizeof(localepath) - (size_t)(tail - localepath));
|
||||||
bindtextdomain(PROJECT_NAME, localepath);
|
bindtextdomain(PROJECT_NAME, localepath);
|
||||||
|
Reference in New Issue
Block a user