Mercurial > vim
changeset 5598:ec93f50f1d93 v7.4.146
updated for version 7.4.146
Problem: When starting Vim with "-u NONE" v:oldfiles is NULL.
Solution: Set v:oldfiles to an empty list. (Yasuhiro Matsumoto)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 14 Jan 2014 12:57:05 +0100 |
parents | ace2fb223261 |
children | 9e9ca74c5753 |
files | src/main.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.c +++ b/src/main.c @@ -702,6 +702,11 @@ vim_main2(int argc UNUSED, char **argv U TIME_MSG("reading viminfo"); } #endif +#ifdef FEAT_EVAL + /* It's better to make v:oldfiles an empty list than NULL. */ + if (get_vim_var_list(VV_OLDFILES) == NULL) + set_vim_var_list(VV_OLDFILES, list_alloc()); +#endif #ifdef FEAT_QUICKFIX /* @@ -1048,7 +1053,7 @@ main_loop(cmdwin, noexmode) /* Setup to catch a terminating error from the X server. Just ignore * it, restore the state and continue. This might not always work * properly, but at least we don't exit unexpectedly when the X server - * exists while Vim is running in a console. */ + * exits while Vim is running in a console. */ if (!cmdwin && !noexmode && SETJMP(x_jump_env)) { State = NORMAL;