On 16/12/13 04:12, mattn wrote:
Hi.

$ vim
:echo v:oldfiles
['/path/to/oldfile.txt', ....snip....]

$ vim -u NONE
$ echo v:oldfiles

This return empty because VV_OLDFILES isn't initialized with allocated list.

Isn't this intentional? With -u NONE, Vim starts in 'nocompatible' mode, thus the default for 'viminfo' is the empty string… and Vim doesn't use a viminfo file (doesn't read it on startup and doesn't write it on exit). Thus there is no list of oldfiles read from the viminfo.

Counterexample:

vim -N -u NONE
:oldfiles

(in plain-vanilla Huge Vim 7.4.131) shows that the oldfiles list has been populated.

See :help 'viminfo'



diff -r 7818ca6de3d0 src/main.c
--- a/src/main.c        Wed Dec 11 18:53:29 2013 +0100
+++ b/src/main.c        Mon Dec 16 12:05:52 2013 +0900
@@ -701,6 +701,10 @@
        read_viminfo(NULL, VIF_WANT_INFO | VIF_GET_OLDFILES);
        TIME_MSG("reading viminfo");
      }
+# ifdef FEAT_EVAL
+    if (get_vim_var_list(VV_OLDFILES) == NULL)
+       set_vim_var_list(VV_OLDFILES, list_alloc());
+# endif
  #endif

  #ifdef FEAT_QUICKFIX

- Yasuhiro Matsumoto


Best regards,
Tony.
--
Q:      How many Oregonians does it take to screw in a light bulb?
A:      Three.  One to screw in the light bulb and two to fend off all those
        Californians trying to share the experience.

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui