mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 14:58:18 +00:00
cleanup
This commit is contained in:
@@ -15740,15 +15740,15 @@ static void f_stdpath(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
|||||||
return; // Type error; errmsg already given.
|
return; // Type error; errmsg already given.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(p, "config") == 0) {
|
if (strequal(p, "config")) {
|
||||||
rettv->vval.v_string = (char_u *)get_xdg_home(kXDGConfigHome);
|
rettv->vval.v_string = (char_u *)get_xdg_home(kXDGConfigHome);
|
||||||
} else if (strcmp(p, "data") == 0) {
|
} else if (strequal(p, "data")) {
|
||||||
rettv->vval.v_string = (char_u *)get_xdg_home(kXDGDataHome);
|
rettv->vval.v_string = (char_u *)get_xdg_home(kXDGDataHome);
|
||||||
} else if (strcmp(p, "cache") == 0) {
|
} else if (strequal(p, "cache")) {
|
||||||
rettv->vval.v_string = (char_u *)get_xdg_home(kXDGCacheHome);
|
rettv->vval.v_string = (char_u *)get_xdg_home(kXDGCacheHome);
|
||||||
} else if (strcmp(p, "config_dirs") == 0) {
|
} else if (strequal(p, "config_dirs")) {
|
||||||
get_xdg_var_list(kXDGConfigDirs, rettv);
|
get_xdg_var_list(kXDGConfigDirs, rettv);
|
||||||
} else if (strcmp(p, "data_dirs") == 0) {
|
} else if (strequal(p, "data_dirs")) {
|
||||||
get_xdg_var_list(kXDGDataDirs, rettv);
|
get_xdg_var_list(kXDGDataDirs, rettv);
|
||||||
} else {
|
} else {
|
||||||
EMSG2(_("E6100: \"%s\" is not a valid stdpath"), p);
|
EMSG2(_("E6100: \"%s\" is not a valid stdpath"), p);
|
||||||
|
@@ -6583,15 +6583,13 @@ static void paste_option_changed(void)
|
|||||||
/// When "fname" is not NULL, use it to set $"envname" when it wasn't set yet.
|
/// When "fname" is not NULL, use it to set $"envname" when it wasn't set yet.
|
||||||
void vimrc_found(char_u *fname, char_u *envname)
|
void vimrc_found(char_u *fname, char_u *envname)
|
||||||
{
|
{
|
||||||
char_u *p;
|
|
||||||
|
|
||||||
if (fname != NULL && envname != NULL) {
|
if (fname != NULL && envname != NULL) {
|
||||||
p = (char_u *)vim_getenv((char *)envname);
|
char *p = vim_getenv((char *)envname);
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
/* Set $MYVIMRC to the first vimrc file found. */
|
// Set $MYVIMRC to the first vimrc file found.
|
||||||
p = (char_u *)FullName_save((char *)fname, FALSE);
|
p = FullName_save((char *)fname, false);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
vim_setenv((char *)envname, (char *)p);
|
vim_setenv((char *)envname, p);
|
||||||
xfree(p);
|
xfree(p);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user