shada: Also expand file name obtained from &shada option

This commit is contained in:
ZyX
2015-08-17 20:44:33 +03:00
parent 5d47fe124a
commit c57c569000

View File

@@ -1597,7 +1597,8 @@ static char *shada_filename(const char *file)
if (file == NULL || *file == NUL) { if (file == NULL || *file == NUL) {
if (used_shada_file != NULL) { if (used_shada_file != NULL) {
file = used_shada_file; file = used_shada_file;
} else if ((file = find_shada_parameter('n')) == NULL || *file == NUL) { } else {
if ((file = find_shada_parameter('n')) == NULL || *file == NUL) {
#ifdef SHADA_FILE2 #ifdef SHADA_FILE2
// don't use $HOME when not defined (turned into "c:/"!). // don't use $HOME when not defined (turned into "c:/"!).
if (os_getenv((char_u *)"HOME") == NULL) { if (os_getenv((char_u *)"HOME") == NULL) {
@@ -1614,6 +1615,7 @@ static char *shada_filename(const char *file)
#ifdef SHADA_FILE2 #ifdef SHADA_FILE2
} }
#endif #endif
}
// XXX It used to be one level lower, so that whatever is in // XXX It used to be one level lower, so that whatever is in
// `used_shada_file` was expanded. I intentionally moved it here // `used_shada_file` was expanded. I intentionally moved it here
// because various expansions must have already be done by the shell. // because various expansions must have already be done by the shell.