home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.2 / 7.2.031 < prev    next >
Encoding:
Internet Message Format  |  2008-11-08  |  38.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.2.031
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.2.031
  11. Problem:    Information in the viminfo file about previously edited files is
  12.         not available to the user.  There is no way to get a complete list
  13.         of files edited in previous Vim sessions.
  14. Solution:   Add v:oldfiles and fill it with the list of old file names when
  15.         first reading the viminfo file.  Add the ":oldfiles" command,
  16.         ":browse oldfiles" and the "#<123" special file name.  Increase
  17.         the default value for 'viminfo' from '20 to '100.
  18. Files:        runtime/doc/cmdline.txt, runtime/doc/eval.txt,
  19.         runtime/doc/starting.txt, runtime/doc/usr_21.txt, src/eval.c,
  20.         src/ex_cmds.c, src/ex_cmds.h, src/ex_docmd.c, src/feature.h,
  21.         src/fileio.c, src/main.c, src/mark.c, src/misc1.c,
  22.         src/proto/eval.pro, src/proto/ex_cmds.pro, src/proto/mark.pro,
  23.         src/option.c, src/structs.h, src/vim.h
  24.  
  25.  
  26. *** ../vim-7.2.030/runtime/doc/cmdline.txt    Sat Aug  9 19:36:46 2008
  27. --- runtime/doc/cmdline.txt    Thu Sep 18 22:55:27 2008
  28. ***************
  29. *** 1,4 ****
  30. ! *cmdline.txt*   For Vim version 7.2.  Last change: 2008 Jul 29
  31.   
  32.   
  33.             VIM REFERENCE MANUAL    by Bram Moolenaar
  34. --- 1,4 ----
  35. ! *cmdline.txt*   For Vim version 7.2.  Last change: 2008 Sep 18
  36.   
  37.   
  38.             VIM REFERENCE MANUAL    by Bram Moolenaar
  39. ***************
  40. *** 157,162 ****
  41. --- 157,167 ----
  42.                   (doesn't work at the expression prompt; some
  43.                   things such as changing the buffer or current
  44.                   window are not allowed to avoid side effects)
  45. +                 When the result is a |List| the items are used
  46. +                 as lines.  They can have line breaks inside
  47. +                 too.
  48. +                 When the result is a Float it's automatically
  49. +                 converted to a String.
  50.           See |registers| about registers.  {not in Vi}
  51.           Implementation detail: When using the |expression| register
  52.           and invoking setcmdpos(), this sets the position before
  53. ***************
  54. *** 730,748 ****
  55.   In Ex commands, at places where a file name can be used, the following
  56.   characters have a special meaning.  These can also be used in the expression
  57.   function expand() |expand()|.
  58. !     %    is replaced with the current file name            *:_%*
  59. !     #    is replaced with the alternate file name        *:_#*
  60.       #n    (where n is a number) is replaced with the file name of
  61. !         buffer n.  "#0" is the same as "#"
  62. !     ##    is replaced with all names in the argument list        *:_##*
  63.           concatenated, separated by spaces.  Each space in a name
  64.           is preceded with a backslash.
  65. ! Note that these give the file name as it was typed.  If an absolute path is
  66. ! needed (when using the file name from a different directory), you need to add
  67. ! ":p".  See |filename-modifiers|.
  68.   Note that backslashes are inserted before spaces, so that the command will
  69.   correctly interpret the file name.  But this doesn't happen for shell
  70. ! commands.  For those you probably have to use quotes: >
  71.       :!ls "%"
  72.       :r !spell "%"
  73.   
  74. --- 735,763 ----
  75.   In Ex commands, at places where a file name can be used, the following
  76.   characters have a special meaning.  These can also be used in the expression
  77.   function expand() |expand()|.
  78. !     %    Is replaced with the current file name.          *:_%* *c_%*
  79. !     #    Is replaced with the alternate file name.      *:_#* *c_#*
  80.       #n    (where n is a number) is replaced with the file name of
  81. !         buffer n.  "#0" is the same as "#".
  82. !     ##    Is replaced with all names in the argument list      *:_##* *c_##*
  83.           concatenated, separated by spaces.  Each space in a name
  84.           is preceded with a backslash.
  85. !     #<n    (where n is a number > 0) is replaced with old      *:_#<* *c_#<*
  86. !         file name n.  See |:oldfiles| or |v:oldfiles| to get the
  87. !         number.                            *E809*
  88. !         {only when compiled with the +eval and +viminfo features}
  89. ! Note that these, except "#<n", give the file name as it was typed.  If an
  90. ! absolute path is needed (when using the file name from a different directory),
  91. ! you need to add ":p".  See |filename-modifiers|.
  92. ! The "#<n" item returns an absolute path, but it will start with "~/" for files
  93. ! below your home directory.
  94.   Note that backslashes are inserted before spaces, so that the command will
  95.   correctly interpret the file name.  But this doesn't happen for shell
  96. ! commands.  For those you probably have to use quotes (this fails for files
  97. ! that contain a quote and wildcards): >
  98.       :!ls "%"
  99.       :r !spell "%"
  100.   
  101. *** ../vim-7.2.030/runtime/doc/eval.txt    Sat Aug  9 19:36:47 2008
  102. --- runtime/doc/eval.txt    Sun Nov  2 14:25:38 2008
  103. ***************
  104. *** 1,4 ****
  105. ! *eval.txt*    For Vim version 7.2.  Last change: 2008 Aug 09
  106.   
  107.   
  108.             VIM REFERENCE MANUAL      by Bram Moolenaar
  109. --- 1,4 ----
  110. ! *eval.txt*    For Vim version 7.2.  Last change: 2008 Nov 02
  111.   
  112.   
  113.             VIM REFERENCE MANUAL      by Bram Moolenaar
  114. ***************
  115. *** 1484,1489 ****
  116. --- 1484,1500 ----
  117.           This is the screen column number, like with |virtcol()|.  The
  118.           value is zero when there was no mouse button click.
  119.   
  120. +                     *v:oldfiles* *oldfiles-variable*
  121. + v:oldfiles    List of file names that is loaded from the |viminfo| file on
  122. +         startup.  These are the files that Vim remembers marks for.
  123. +         The length of the List is limited by the ' argument of the
  124. +         'viminfo' option (default is 100).
  125. +         Also see |:oldfiles| and |c_#<|.
  126. +         The List can be modified, but this has no effect on what is
  127. +         stored in the |viminfo| file later.  If you use values other
  128. +         than String this will cause trouble.
  129. +         {only when compiled with the +viminfo feature}
  130.                       *v:operator* *operator-variable*
  131.   v:operator    The last operator given in Normal mode.  This is a single
  132.           character except for commands starting with <g> or <z>,
  133. *** ../vim-7.2.030/runtime/doc/starting.txt    Sat Aug  9 19:36:52 2008
  134. --- runtime/doc/starting.txt    Sun Nov  9 12:12:19 2008
  135. ***************
  136. *** 1,4 ****
  137. ! *starting.txt*  For Vim version 7.2.  Last change: 2008 Jun 21
  138.   
  139.   
  140.             VIM REFERENCE MANUAL    by Bram Moolenaar
  141. --- 1,4 ----
  142. ! *starting.txt*  For Vim version 7.2.  Last change: 2008 Nov 09
  143.   
  144.   
  145.             VIM REFERENCE MANUAL    by Bram Moolenaar
  146. ***************
  147. *** 1337,1344 ****
  148.                               *viminfo-read*
  149.   When Vim is started and the 'viminfo' option is non-empty, the contents of
  150.   the viminfo file are read and the info can be used in the appropriate places.
  151. ! The marks are not read in at startup (but file marks are).  See
  152. ! |initialization| for how to set the 'viminfo' option upon startup.
  153.   
  154.                               *viminfo-write*
  155.   When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo
  156. --- 1335,1343 ----
  157.                               *viminfo-read*
  158.   When Vim is started and the 'viminfo' option is non-empty, the contents of
  159.   the viminfo file are read and the info can be used in the appropriate places.
  160. ! The |v:oldfiles| variable is filled.  The marks are not read in at startup
  161. ! (but file marks are).  See |initialization| for how to set the 'viminfo'
  162. ! option upon startup.
  163.   
  164.                               *viminfo-write*
  165.   When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo
  166. ***************
  167. *** 1372,1377 ****
  168. --- 1371,1378 ----
  169.   that start with any string given with the "r" flag in 'viminfo'.  This can be
  170.   used to avoid saving marks for files on removable media (for MS-DOS you would
  171.   use "ra:,rb:", for Amiga "rdf0:,rdf1:,rdf2:").
  172. + The |v:oldfiles| variable is filled with the file names that the viminfo file
  173. + has marks for.
  174.   
  175.                               *viminfo-file-marks*
  176.   Uppercase marks ('A to 'Z) are stored when writing the viminfo file.  The
  177. ***************
  178. *** 1463,1470 ****
  179.                              *:rv* *:rviminfo* *E195*
  180.   :rv[iminfo][!] [file]    Read from viminfo file [file] (default: see above).
  181.               If [!] is given, then any information that is
  182. !             already set (registers, marks, etc.) will be
  183. !             overwritten.  {not in Vi}
  184.   
  185.                       *:wv* *:wviminfo* *E137* *E138* *E574*
  186.   :wv[iminfo][!] [file]    Write to viminfo file [file] (default: see above).
  187. --- 1464,1471 ----
  188.                              *:rv* *:rviminfo* *E195*
  189.   :rv[iminfo][!] [file]    Read from viminfo file [file] (default: see above).
  190.               If [!] is given, then any information that is
  191. !             already set (registers, marks, |v:oldfiles|, etc.)
  192. !             will be overwritten   {not in Vi}
  193.   
  194.                       *:wv* *:wviminfo* *E137* *E138* *E574*
  195.   :wv[iminfo][!] [file]    Write to viminfo file [file] (default: see above).
  196. ***************
  197. *** 1479,1482 ****
  198. --- 1480,1499 ----
  199.               the .viminfo file.
  200.               {not in Vi}
  201.   
  202. +                         *:ol* *:oldfiles*
  203. + :ol[dfiles]        List the files that have marks stored in the viminfo
  204. +             file.  This list is read on startup and only changes
  205. +             afterwards with ":rviminfo!".  Also see |v:oldfiles|.
  206. +             The number can be used with |c_#<|.
  207. +             {not in Vi, only when compiled with the +eval feature}
  208. + :bro[wse] ol[dfiles][!]
  209. +             List file names as with |:oldfiles|, and then prompt
  210. +             for a number.  When the number is valid that file from
  211. +             the list is edited.
  212. +             If you get the |press-enter| prompt you can press "q"
  213. +             and still get the prompt to enter a file number.
  214. +             Use ! to abondon a modified buffer. |abandon|
  215. +             {not when compiled with tiny or small features}
  216.    vim:tw=78:ts=8:ft=help:norl:
  217. *** ../vim-7.2.030/runtime/doc/usr_21.txt    Sat Aug  9 19:36:53 2008
  218. --- runtime/doc/usr_21.txt    Sun Nov  9 12:14:10 2008
  219. ***************
  220. *** 1,4 ****
  221. ! *usr_21.txt*    For Vim version 7.2.  Last change: 2007 May 01
  222.   
  223.                VIM USER MANUAL - by Bram Moolenaar
  224.   
  225. --- 1,4 ----
  226. ! *usr_21.txt*    For Vim version 7.2.  Last change: 2008 Nov 09
  227.   
  228.                VIM USER MANUAL - by Bram Moolenaar
  229.   
  230. ***************
  231. *** 153,159 ****
  232.   to be lost.  Each item can be remembered only once.
  233.   
  234.   
  235. ! GETTING BACK TO WHERE YOU WERE
  236.   
  237.   You are halfway editing a file and it's time to leave for holidays.  You exit
  238.   Vim and go enjoy yourselves, forgetting all about your work.  After a couple
  239. --- 153,159 ----
  240.   to be lost.  Each item can be remembered only once.
  241.   
  242.   
  243. ! GETTING BACK TO WHERE YOU STOPPED VIM
  244.   
  245.   You are halfway editing a file and it's time to leave for holidays.  You exit
  246.   Vim and go enjoy yourselves, forgetting all about your work.  After a couple
  247. ***************
  248. *** 168,173 ****
  249. --- 168,215 ----
  250.      The |:marks| command is useful to find out where '0 to '9 will take you.
  251.   
  252.   
  253. + GETTING BACK TO SOME FILE
  254. + If you want to go back to a file that you edited recently, but not when
  255. + exiting Vim, there is a slightly more complicated way.  You can see a list of
  256. + files by typing the command: >
  257. +     :oldfiles
  258. + <    1: ~/.viminfo ~
  259. +     2: ~/text/resume.txt ~
  260. +     3: /tmp/draft ~
  261. + Now you would like to edit the second file, which is in the list preceded by
  262. + "2:".  You type: >
  263. +     :e #<2
  264. + Instead of ":e" you can use any command that has a file name argument, the
  265. + "#<2" item works in the same place as "%" (current file name) and "#"
  266. + (alternate file name).  So you can also split the window to edit the third
  267. + file: >
  268. +     :split #<3
  269. + That #<123 thing is a bit complicated when you just want to edit a file.
  270. + Fortunately there is a simpler way: >
  271. +     :browse oldfiles
  272. + <    1: ~/.viminfo ~
  273. +     2: ~/text/resume.txt ~
  274. +     3: /tmp/draft ~
  275. +     -- More --
  276. + You get the same list of files as with |:oldfiles|.  If you want to edit
  277. + "resume.txt" first press "q" to stop the listing.  You will get a prompt:
  278. +     Type number and <Enter> (empty cancels): ~
  279. + Type "2" and press <Enter> to edit the second file.
  280. + More info at |:oldfiles|, |v:oldfiles| and |c_#<|.
  281.   MOVE INFO FROM ONE VIM TO ANOTHER
  282.   
  283.   You can use the ":wviminfo" and ":rviminfo" commands to save and restore the
  284. *** ../vim-7.2.030/src/eval.c    Thu Nov  6 11:04:50 2008
  285. --- src/eval.c    Sun Nov  9 11:59:39 2008
  286. ***************
  287. *** 348,353 ****
  288. --- 348,354 ----
  289.       {VV_NAME("mouse_col",     VAR_NUMBER), 0},
  290.       {VV_NAME("operator",     VAR_STRING), VV_RO},
  291.       {VV_NAME("searchforward",     VAR_NUMBER), 0},
  292. +     {VV_NAME("oldfiles",     VAR_LIST), 0},
  293.   };
  294.   
  295.   /* shorthand */
  296. ***************
  297. *** 355,360 ****
  298. --- 356,362 ----
  299.   #define vv_nr        vv_di.di_tv.vval.v_number
  300.   #define vv_float    vv_di.di_tv.vval.v_float
  301.   #define vv_str        vv_di.di_tv.vval.v_string
  302. + #define vv_list        vv_di.di_tv.vval.v_list
  303.   #define vv_tv        vv_di.di_tv
  304.   
  305.   /*
  306. ***************
  307. *** 426,432 ****
  308.   static long list_idx_of_item __ARGS((list_T *l, listitem_T *item));
  309.   static void list_append __ARGS((list_T *l, listitem_T *item));
  310.   static int list_append_tv __ARGS((list_T *l, typval_T *tv));
  311. - static int list_append_string __ARGS((list_T *l, char_u *str, int len));
  312.   static int list_append_number __ARGS((list_T *l, varnumber_T n));
  313.   static int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
  314.   static int list_extend __ARGS((list_T    *l1, list_T *l2, listitem_T *bef));
  315. --- 428,433 ----
  316. ***************
  317. *** 845,852 ****
  318.       p = &vimvars[i];
  319.       if (p->vv_di.di_tv.v_type == VAR_STRING)
  320.       {
  321. !         vim_free(p->vv_di.di_tv.vval.v_string);
  322. !         p->vv_di.di_tv.vval.v_string = NULL;
  323.       }
  324.       }
  325.       hash_clear(&vimvarht);
  326. --- 846,858 ----
  327.       p = &vimvars[i];
  328.       if (p->vv_di.di_tv.v_type == VAR_STRING)
  329.       {
  330. !         vim_free(p->vv_string);
  331. !         p->vv_string = NULL;
  332. !     }
  333. !     else if (p->vv_di.di_tv.v_type == VAR_LIST)
  334. !     {
  335. !         list_unref(p->vv_list);
  336. !         p->vv_list = NULL;
  337.       }
  338.       }
  339.       hash_clear(&vimvarht);
  340. ***************
  341. *** 6057,6062 ****
  342. --- 6063,6087 ----
  343.   }
  344.   
  345.   /*
  346. +  * Get list item "l[idx - 1]" as a string.  Returns NULL for failure.
  347. +  */
  348. +     char_u *
  349. + list_find_str(l, idx)
  350. +     list_T    *l;
  351. +     long    idx;
  352. + {
  353. +     listitem_T    *li;
  354. +     li = list_find(l, idx - 1);
  355. +     if (li == NULL)
  356. +     {
  357. +     EMSGN(_(e_listidx), idx);
  358. +     return NULL;
  359. +     }
  360. +     return get_tv_string(&li->li_tv);
  361. + }
  362. + /*
  363.    * Locate "item" list "l" and return its index.
  364.    * Returns -1 when "item" is not in the list.
  365.    */
  366. ***************
  367. *** 6147,6153 ****
  368.    * When "len" >= 0 use "str[len]".
  369.    * Returns FAIL when out of memory.
  370.    */
  371. !     static int
  372.   list_append_string(l, str, len)
  373.       list_T    *l;
  374.       char_u    *str;
  375. --- 6172,6178 ----
  376.    * When "len" >= 0 use "str[len]".
  377.    * Returns FAIL when out of memory.
  378.    */
  379. !     int
  380.   list_append_string(l, str, len)
  381.       list_T    *l;
  382.       char_u    *str;
  383. ***************
  384. *** 6507,6512 ****
  385. --- 6532,6540 ----
  386.       set_ref_in_ht(&fc->l_avars.dv_hashtab, copyID);
  387.       }
  388.   
  389. +     /* v: vars */
  390. +     set_ref_in_ht(&vimvarht, copyID);
  391.       /*
  392.        * 2. Go through the list of dicts and free items without the copyID.
  393.        */
  394. ***************
  395. *** 6597,6603 ****
  396.       {
  397.       case VAR_DICT:
  398.           dd = tv->vval.v_dict;
  399. !         if (dd->dv_copyID != copyID)
  400.           {
  401.           /* Didn't see this dict yet. */
  402.           dd->dv_copyID = copyID;
  403. --- 6625,6631 ----
  404.       {
  405.       case VAR_DICT:
  406.           dd = tv->vval.v_dict;
  407. !         if (dd != NULL && dd->dv_copyID != copyID)
  408.           {
  409.           /* Didn't see this dict yet. */
  410.           dd->dv_copyID = copyID;
  411. ***************
  412. *** 6607,6613 ****
  413.   
  414.       case VAR_LIST:
  415.           ll = tv->vval.v_list;
  416. !         if (ll->lv_copyID != copyID)
  417.           {
  418.           /* Didn't see this list yet. */
  419.           ll->lv_copyID = copyID;
  420. --- 6635,6641 ----
  421.   
  422.       case VAR_LIST:
  423.           ll = tv->vval.v_list;
  424. !         if (ll != NULL && ll->lv_copyID != copyID)
  425.           {
  426.           /* Didn't see this list yet. */
  427.           ll->lv_copyID = copyID;
  428. ***************
  429. *** 18106,18111 ****
  430. --- 18134,18150 ----
  431.   }
  432.   
  433.   /*
  434. +  * Get List v: variable value.  Caller must take care of reference count when
  435. +  * needed.
  436. +  */
  437. +     list_T *
  438. + get_vim_var_list(idx)
  439. +     int        idx;
  440. + {
  441. +     return vimvars[idx].vv_list;
  442. + }
  443. + /*
  444.    * Set v:count, v:count1 and v:prevcount.
  445.    */
  446.       void
  447. ***************
  448. *** 18141,18146 ****
  449. --- 18180,18199 ----
  450.   }
  451.   
  452.   /*
  453. +  * Set List v: variable to "val".
  454. +  */
  455. +     void
  456. + set_vim_var_list(idx, val)
  457. +     int        idx;
  458. +     list_T    *val;
  459. + {
  460. +     list_unref(vimvars[idx].vv_list);
  461. +     vimvars[idx].vv_list = val;
  462. +     if (val != NULL)
  463. +     ++val->lv_refcount;
  464. + }
  465. + /*
  466.    * Set v:register if needed.
  467.    */
  468.       void
  469. ***************
  470. *** 21900,21905 ****
  471. --- 21953,22014 ----
  472.       }
  473.   }
  474.   
  475. + /*
  476. +  * List v:oldfiles in a nice way.
  477. +  */
  478. + /*ARGSUSED*/
  479. +     void
  480. + ex_oldfiles(eap)
  481. +     exarg_T    *eap;
  482. + {
  483. +     list_T    *l = vimvars[VV_OLDFILES].vv_list;
  484. +     listitem_T    *li;
  485. +     int        nr = 0;
  486. +     if (l == NULL)
  487. +     msg((char_u *)_("No old files"));
  488. +     else
  489. +     {
  490. +     msg_start();
  491. +     msg_scroll = TRUE;
  492. +     for (li = l->lv_first; li != NULL && !got_int; li = li->li_next)
  493. +     {
  494. +         msg_outnum((long)++nr);
  495. +         MSG_PUTS(": ");
  496. +         msg_outtrans(get_tv_string(&li->li_tv));
  497. +         msg_putchar('\n');
  498. +         out_flush();        /* output one line at a time */
  499. +         ui_breakcheck();
  500. +     }
  501. +     /* Assume "got_int" was set to truncate the listing. */
  502. +     got_int = FALSE;
  503. + #ifdef FEAT_BROWSE_CMD
  504. +     if (cmdmod.browse)
  505. +     {
  506. +         quit_more = FALSE;
  507. +         nr = prompt_for_number(FALSE);
  508. +         msg_starthere();
  509. +         if (nr > 0)
  510. +         {
  511. +         char_u *p = list_find_str(get_vim_var_list(VV_OLDFILES),
  512. +                                     (long)nr);
  513. +         if (p != NULL)
  514. +         {
  515. +             p = expand_env_save(p);
  516. +             eap->arg = p;
  517. +             eap->cmdidx = CMD_edit;
  518. +             cmdmod.browse = FALSE;
  519. +             do_exedit(eap, NULL);
  520. +             vim_free(p);
  521. +         }
  522. +         }
  523. +     }
  524. + #endif
  525. +     }
  526. + }
  527.   #endif /* FEAT_EVAL */
  528.   
  529.   
  530. *** ../vim-7.2.030/src/ex_cmds.c    Sun Sep 14 21:40:26 2008
  531. --- src/ex_cmds.c    Sun Sep 14 13:45:03 2008
  532. ***************
  533. *** 24,30 ****
  534.   static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out));
  535.   #ifdef FEAT_VIMINFO
  536.   static char_u *viminfo_filename __ARGS((char_u    *));
  537. ! static void do_viminfo __ARGS((FILE *fp_in, FILE *fp_out, int want_info, int want_marks, int force_read));
  538.   static int viminfo_encoding __ARGS((vir_T *virp));
  539.   static int read_viminfo_up_to_marks __ARGS((vir_T *virp, int forceit, int writing));
  540.   #endif
  541. --- 24,30 ----
  542.   static void do_filter __ARGS((linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out));
  543.   #ifdef FEAT_VIMINFO
  544.   static char_u *viminfo_filename __ARGS((char_u    *));
  545. ! static void do_viminfo __ARGS((FILE *fp_in, FILE *fp_out, int flags));
  546.   static int viminfo_encoding __ARGS((vir_T *virp));
  547.   static int read_viminfo_up_to_marks __ARGS((vir_T *virp, int forceit, int writing));
  548.   #endif
  549. ***************
  550. *** 1676,1689 ****
  551.   
  552.   /*
  553.    * read_viminfo() -- Read the viminfo file.  Registers etc. which are already
  554. !  * set are not over-written unless force is TRUE. -- webb
  555.    */
  556.       int
  557. ! read_viminfo(file, want_info, want_marks, forceit)
  558. !     char_u    *file;
  559. !     int        want_info;
  560. !     int        want_marks;
  561. !     int        forceit;
  562.   {
  563.       FILE    *fp;
  564.       char_u    *fname;
  565. --- 1676,1687 ----
  566.   
  567.   /*
  568.    * read_viminfo() -- Read the viminfo file.  Registers etc. which are already
  569. !  * set are not over-written unless "flags" includes VIF_FORCEIT. -- webb
  570.    */
  571.       int
  572. ! read_viminfo(file, flags)
  573. !     char_u    *file;        /* file name or NULL to use default name */
  574. !     int        flags;        /* VIF_WANT_INFO et al. */
  575.   {
  576.       FILE    *fp;
  577.       char_u    *fname;
  578. ***************
  579. *** 1691,1697 ****
  580.       if (no_viminfo())
  581.       return FAIL;
  582.   
  583. !     fname = viminfo_filename(file);        /* may set to default if NULL */
  584.       if (fname == NULL)
  585.       return FAIL;
  586.       fp = mch_fopen((char *)fname, READBIN);
  587. --- 1689,1695 ----
  588.       if (no_viminfo())
  589.       return FAIL;
  590.   
  591. !     fname = viminfo_filename(file);    /* get file name in allocated buffer */
  592.       if (fname == NULL)
  593.       return FAIL;
  594.       fp = mch_fopen((char *)fname, READBIN);
  595. ***************
  596. *** 1701,1708 ****
  597.       verbose_enter();
  598.       smsg((char_u *)_("Reading viminfo file \"%s\"%s%s%s"),
  599.           fname,
  600. !         want_info ? _(" info") : "",
  601. !         want_marks ? _(" marks") : "",
  602.           fp == NULL ? _(" FAILED") : "");
  603.       verbose_leave();
  604.       }
  605. --- 1699,1707 ----
  606.       verbose_enter();
  607.       smsg((char_u *)_("Reading viminfo file \"%s\"%s%s%s"),
  608.           fname,
  609. !         (flags & VIF_WANT_INFO) ? _(" info") : "",
  610. !         (flags & VIF_WANT_MARKS) ? _(" marks") : "",
  611. !         (flags & VIF_GET_OLDFILES) ? _(" oldfiles") : "",
  612.           fp == NULL ? _(" FAILED") : "");
  613.       verbose_leave();
  614.       }
  615. ***************
  616. *** 1712,1721 ****
  617.       return FAIL;
  618.   
  619.       viminfo_errcnt = 0;
  620. !     do_viminfo(fp, NULL, want_info, want_marks, forceit);
  621.   
  622.       fclose(fp);
  623.       return OK;
  624.   }
  625.   
  626. --- 1711,1719 ----
  627.       return FAIL;
  628.   
  629.       viminfo_errcnt = 0;
  630. !     do_viminfo(fp, NULL, flags);
  631.   
  632.       fclose(fp);
  633.       return OK;
  634.   }
  635.   
  636. ***************
  637. *** 1968,1974 ****
  638.       }
  639.   
  640.       viminfo_errcnt = 0;
  641. !     do_viminfo(fp_in, fp_out, !forceit, !forceit, FALSE);
  642.   
  643.       fclose(fp_out);        /* errors are ignored !? */
  644.       if (fp_in != NULL)
  645. --- 1966,1972 ----
  646.       }
  647.   
  648.       viminfo_errcnt = 0;
  649. !     do_viminfo(fp_in, fp_out, forceit ? 0 : (VIF_WANT_INFO | VIF_WANT_MARKS));
  650.   
  651.       fclose(fp_out);        /* errors are ignored !? */
  652.       if (fp_in != NULL)
  653. ***************
  654. *** 2041,2052 ****
  655.    * do_viminfo() -- Should only be called from read_viminfo() & write_viminfo().
  656.    */
  657.       static void
  658. ! do_viminfo(fp_in, fp_out, want_info, want_marks, force_read)
  659.       FILE    *fp_in;
  660.       FILE    *fp_out;
  661. !     int        want_info;
  662. !     int        want_marks;
  663. !     int        force_read;
  664.   {
  665.       int        count = 0;
  666.       int        eof = FALSE;
  667. --- 2039,2048 ----
  668.    * do_viminfo() -- Should only be called from read_viminfo() & write_viminfo().
  669.    */
  670.       static void
  671. ! do_viminfo(fp_in, fp_out, flags)
  672.       FILE    *fp_in;
  673.       FILE    *fp_out;
  674. !     int        flags;
  675.   {
  676.       int        count = 0;
  677.       int        eof = FALSE;
  678. ***************
  679. *** 2061,2068 ****
  680.   
  681.       if (fp_in != NULL)
  682.       {
  683. !     if (want_info)
  684. !         eof = read_viminfo_up_to_marks(&vir, force_read, fp_out != NULL);
  685.       else
  686.           /* Skip info, find start of marks */
  687.           while (!(eof = viminfo_readline(&vir))
  688. --- 2057,2065 ----
  689.   
  690.       if (fp_in != NULL)
  691.       {
  692. !     if (flags & VIF_WANT_INFO)
  693. !         eof = read_viminfo_up_to_marks(&vir,
  694. !                      flags & VIF_FORCEIT, fp_out != NULL);
  695.       else
  696.           /* Skip info, find start of marks */
  697.           while (!(eof = viminfo_readline(&vir))
  698. ***************
  699. *** 2092,2099 ****
  700.       write_viminfo_bufferlist(fp_out);
  701.       count = write_viminfo_marks(fp_out);
  702.       }
  703. !     if (fp_in != NULL && want_marks)
  704. !     copy_viminfo_marks(&vir, fp_out, count, eof);
  705.   
  706.       vim_free(vir.vir_line);
  707.   #ifdef FEAT_MBYTE
  708. --- 2089,2097 ----
  709.       write_viminfo_bufferlist(fp_out);
  710.       count = write_viminfo_marks(fp_out);
  711.       }
  712. !     if (fp_in != NULL
  713. !         && (flags & (VIF_WANT_MARKS | VIF_GET_OLDFILES | VIF_FORCEIT)))
  714. !     copy_viminfo_marks(&vir, fp_out, count, eof, flags);
  715.   
  716.       vim_free(vir.vir_line);
  717.   #ifdef FEAT_MBYTE
  718. *** ../vim-7.2.030/src/ex_cmds.h    Thu Nov  6 20:47:00 2008
  719. --- src/ex_cmds.h    Thu Sep 18 22:18:14 2008
  720. ***************
  721. *** 653,658 ****
  722. --- 653,660 ----
  723.               EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
  724.   EX(CMD_open,        "open",        ex_open,
  725.               RANGE|EXTRA),
  726. + EX(CMD_oldfiles,    "oldfiles",    ex_oldfiles,
  727. +             BANG|TRLBAR|SBOXOK|CMDWIN),
  728.   EX(CMD_omap,        "omap",        ex_map,
  729.               EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
  730.   EX(CMD_omapclear,    "omapclear",    ex_mapclear,
  731. *** ../vim-7.2.030/src/ex_docmd.c    Thu Nov  6 17:16:06 2008
  732. --- src/ex_docmd.c    Mon Nov  3 21:21:17 2008
  733. ***************
  734. *** 364,369 ****
  735. --- 364,370 ----
  736.   # define ex_function        ex_ni
  737.   # define ex_delfunction        ex_ni
  738.   # define ex_return        ex_ni
  739. + # define ex_oldfiles        ex_ni
  740.   #endif
  741.   static char_u    *arg_all __ARGS((void));
  742.   #ifdef FEAT_SESSION
  743. ***************
  744. *** 1770,1776 ****
  745.               }
  746.               if (checkforcmd(&ea.cmd, "browse", 3))
  747.               {
  748. ! #ifdef FEAT_BROWSE
  749.                   cmdmod.browse = TRUE;
  750.   #endif
  751.                   continue;
  752. --- 1771,1777 ----
  753.               }
  754.               if (checkforcmd(&ea.cmd, "browse", 3))
  755.               {
  756. ! #ifdef FEAT_BROWSE_CMD
  757.                   cmdmod.browse = TRUE;
  758.   #endif
  759.                   continue;
  760. ***************
  761. *** 9508,9531 ****
  762.               break;
  763.           }
  764.           s = src + 1;
  765.           i = (int)getdigits(&s);
  766.           *usedlen = (int)(s - src); /* length of what we expand */
  767.   
  768. !         buf = buflist_findnr(i);
  769. !         if (buf == NULL)
  770.           {
  771. !             *errormsg = (char_u *)_("E194: No alternate file name to substitute for '#'");
  772.               return NULL;
  773.           }
  774. !         if (lnump != NULL)
  775. !             *lnump = ECMD_LAST;
  776. !         if (buf->b_fname == NULL)
  777.           {
  778. !             result = (char_u *)"";
  779. !             valid = 0;        /* Must have ":p:h" to be valid */
  780.           }
  781. -         else
  782. -             result = buf->b_fname;
  783.           break;
  784.   
  785.   #ifdef FEAT_SEARCHPATH
  786. --- 9509,9558 ----
  787.               break;
  788.           }
  789.           s = src + 1;
  790. +         if (*s == '<')        /* "#<99" uses v:oldfiles */
  791. +             ++s;
  792.           i = (int)getdigits(&s);
  793.           *usedlen = (int)(s - src); /* length of what we expand */
  794.   
  795. !         if (src[1] == '<')
  796.           {
  797. !             if (*usedlen < 2)
  798. !             {
  799. !             /* Should we give an error message for #<text? */
  800. !             *usedlen = 1;
  801. !             return NULL;
  802. !             }
  803. ! #ifdef FEAT_EVAL
  804. !             result = list_find_str(get_vim_var_list(VV_OLDFILES),
  805. !                                      (long)i);
  806. !             if (result == NULL)
  807. !             {
  808. !             *errormsg = (char_u *)"";
  809. !             return NULL;
  810. !             }
  811. ! #else
  812. !             *errormsg = (char_u *)_("E809: #< is not available without the +eval feature");
  813.               return NULL;
  814. + #endif
  815.           }
  816. !         else
  817.           {
  818. !             buf = buflist_findnr(i);
  819. !             if (buf == NULL)
  820. !             {
  821. !             *errormsg = (char_u *)_("E194: No alternate file name to substitute for '#'");
  822. !             return NULL;
  823. !             }
  824. !             if (lnump != NULL)
  825. !             *lnump = ECMD_LAST;
  826. !             if (buf->b_fname == NULL)
  827. !             {
  828. !             result = (char_u *)"";
  829. !             valid = 0;        /* Must have ":p:h" to be valid */
  830. !             }
  831. !             else
  832. !             result = buf->b_fname;
  833.           }
  834.           break;
  835.   
  836.   #ifdef FEAT_SEARCHPATH
  837. ***************
  838. *** 10700,10706 ****
  839.       p_viminfo = (char_u *)"'100";
  840.       if (eap->cmdidx == CMD_rviminfo)
  841.       {
  842. !     if (read_viminfo(eap->arg, TRUE, TRUE, eap->forceit) == FAIL)
  843.           EMSG(_("E195: Cannot open viminfo file for reading"));
  844.       }
  845.       else
  846. --- 10727,10734 ----
  847.       p_viminfo = (char_u *)"'100";
  848.       if (eap->cmdidx == CMD_rviminfo)
  849.       {
  850. !     if (read_viminfo(eap->arg, VIF_WANT_INFO | VIF_WANT_MARKS
  851. !                   | (eap->forceit ? VIF_FORCEIT : 0)) == FAIL)
  852.           EMSG(_("E195: Cannot open viminfo file for reading"));
  853.       }
  854.       else
  855. *** ../vim-7.2.030/src/feature.h    Wed Aug  6 18:45:07 2008
  856. --- src/feature.h    Fri Sep 19 19:14:22 2008
  857. ***************
  858. *** 767,775 ****
  859.   
  860.   /*
  861.    * +browse        ":browse" command.
  862.    */
  863. ! #if defined(FEAT_NORMAL) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
  864. ! # define FEAT_BROWSE
  865.   #endif
  866.   
  867.   /*
  868. --- 767,779 ----
  869.   
  870.   /*
  871.    * +browse        ":browse" command.
  872. +  *            or just the ":browse" command modifier
  873.    */
  874. ! #if defined(FEAT_NORMAL)
  875. ! # define FEAT_BROWSE_CMD
  876. ! # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)
  877. ! #  define FEAT_BROWSE
  878. ! # endif
  879.   #endif
  880.   
  881.   /*
  882. *** ../vim-7.2.030/src/fileio.c    Thu Sep 18 21:29:07 2008
  883. --- src/fileio.c    Mon Nov  3 21:21:47 2008
  884. ***************
  885. *** 2711,2717 ****
  886.   {
  887.       if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0
  888.                             && curbuf->b_ffname != NULL)
  889. !     read_viminfo(NULL, FALSE, TRUE, FALSE);
  890.   
  891.       /* Always set b_marks_read; needed when 'viminfo' is changed to include
  892.        * the ' parameter after opening a buffer. */
  893. --- 2711,2717 ----
  894.   {
  895.       if (!curbuf->b_marks_read && get_viminfo_parameter('\'') > 0
  896.                             && curbuf->b_ffname != NULL)
  897. !     read_viminfo(NULL, VIF_WANT_MARKS);
  898.   
  899.       /* Always set b_marks_read; needed when 'viminfo' is changed to include
  900.        * the ' parameter after opening a buffer. */
  901. ***************
  902. *** 9108,9114 ****
  903.   set_context_in_autocmd(xp, arg, doautocmd)
  904.       expand_T    *xp;
  905.       char_u    *arg;
  906. !     int        doautocmd;    /* TRUE for :doautocmd, FALSE for :autocmd */
  907.   {
  908.       char_u    *p;
  909.       int        group;
  910. --- 9109,9115 ----
  911.   set_context_in_autocmd(xp, arg, doautocmd)
  912.       expand_T    *xp;
  913.       char_u    *arg;
  914. !     int        doautocmd;    /* TRUE for :doauto*, FALSE for :autocmd */
  915.   {
  916.       char_u    *p;
  917.       int        group;
  918. *** ../vim-7.2.030/src/main.c    Thu Sep 18 20:55:19 2008
  919. --- src/main.c    Sun Sep 14 13:26:10 2008
  920. ***************
  921. *** 645,655 ****
  922.   
  923.   #ifdef FEAT_VIMINFO
  924.       /*
  925. !      * Read in registers, history etc, but not marks, from the viminfo file
  926.        */
  927.       if (*p_viminfo != NUL)
  928.       {
  929. !     read_viminfo(NULL, TRUE, FALSE, FALSE);
  930.       TIME_MSG("reading viminfo");
  931.       }
  932.   #endif
  933. --- 645,656 ----
  934.   
  935.   #ifdef FEAT_VIMINFO
  936.       /*
  937. !      * Read in registers, history etc, but not marks, from the viminfo file.
  938. !      * This is where v:oldfiles gets filled.
  939.        */
  940.       if (*p_viminfo != NUL)
  941.       {
  942. !     read_viminfo(NULL, VIF_WANT_INFO | VIF_GET_OLDFILES);
  943.       TIME_MSG("reading viminfo");
  944.       }
  945.   #endif
  946. *** ../vim-7.2.030/src/mark.c    Sat Aug  9 19:37:29 2008
  947. --- src/mark.c    Sun Sep 14 13:46:19 2008
  948. ***************
  949. *** 1627,1641 ****
  950.   
  951.   /*
  952.    * Handle marks in the viminfo file:
  953. !  * fp_out == NULL   read marks for current buffer only
  954. !  * fp_out != NULL   copy marks for buffers not in buffer list
  955.    */
  956.       void
  957. ! copy_viminfo_marks(virp, fp_out, count, eof)
  958.       vir_T    *virp;
  959.       FILE    *fp_out;
  960.       int        count;
  961.       int        eof;
  962.   {
  963.       char_u    *line = virp->vir_line;
  964.       buf_T    *buf;
  965. --- 1627,1643 ----
  966.   
  967.   /*
  968.    * Handle marks in the viminfo file:
  969. !  * fp_out != NULL: copy marks for buffers not in buffer list
  970. !  * fp_out == NULL && (flags & VIF_WANT_MARKS): read marks for curbuf only
  971. !  * fp_out == NULL && (flags & VIF_GET_OLDFILES | VIF_FORCEIT): fill v:oldfiles
  972.    */
  973.       void
  974. ! copy_viminfo_marks(virp, fp_out, count, eof, flags)
  975.       vir_T    *virp;
  976.       FILE    *fp_out;
  977.       int        count;
  978.       int        eof;
  979. +     int        flags;
  980.   {
  981.       char_u    *line = virp->vir_line;
  982.       buf_T    *buf;
  983. ***************
  984. *** 1647,1656 ****
  985. --- 1649,1671 ----
  986.       char_u    *p;
  987.       char_u    *name_buf;
  988.       pos_T    pos;
  989. + #ifdef FEAT_EVAL
  990. +     list_T    *list = NULL;
  991. + #endif
  992.   
  993.       if ((name_buf = alloc(LSIZE)) == NULL)
  994.       return;
  995.       *name_buf = NUL;
  996. + #ifdef FEAT_EVAL
  997. +     if (fp_out == NULL && (flags & (VIF_GET_OLDFILES | VIF_FORCEIT)))
  998. +     {
  999. +     list = list_alloc();
  1000. +     if (list != NULL)
  1001. +         set_vim_var_list(VV_OLDFILES, list);
  1002. +     }
  1003. + #endif
  1004.       num_marked_files = get_viminfo_parameter('\'');
  1005.       while (!eof && (count < num_marked_files || fp_out == NULL))
  1006.       {
  1007. ***************
  1008. *** 1681,1686 ****
  1009. --- 1696,1706 ----
  1010.           p++;
  1011.       *p = NUL;
  1012.   
  1013. + #ifdef FEAT_EVAL
  1014. +     if (list != NULL)
  1015. +         list_append_string(list, str, -1);
  1016. + #endif
  1017.       /*
  1018.        * If fp_out == NULL, load marks for current buffer.
  1019.        * If fp_out != NULL, copy marks for buffers not in buflist.
  1020. ***************
  1021. *** 1688,1694 ****
  1022.       load_marks = copy_marks_out = FALSE;
  1023.       if (fp_out == NULL)
  1024.       {
  1025. !         if (curbuf->b_ffname != NULL)
  1026.           {
  1027.           if (*name_buf == NUL)        /* only need to do this once */
  1028.               home_replace(NULL, curbuf->b_ffname, name_buf, LSIZE, TRUE);
  1029. --- 1708,1714 ----
  1030.       load_marks = copy_marks_out = FALSE;
  1031.       if (fp_out == NULL)
  1032.       {
  1033. !         if ((flags & VIF_WANT_MARKS) && curbuf->b_ffname != NULL)
  1034.           {
  1035.           if (*name_buf == NUL)        /* only need to do this once */
  1036.               home_replace(NULL, curbuf->b_ffname, name_buf, LSIZE, TRUE);
  1037. *** ../vim-7.2.030/src/misc1.c    Wed Jun 25 00:24:52 2008
  1038. --- src/misc1.c    Sun Nov  9 11:47:00 2008
  1039. ***************
  1040. *** 3245,3253 ****
  1041.   
  1042.       /* When using ":silent" assume that <CR> was entered. */
  1043.       if (mouse_used != NULL)
  1044. !     MSG_PUTS(_("Type number or click with mouse (<Enter> cancels): "));
  1045.       else
  1046. !     MSG_PUTS(_("Choice number (<Enter> cancels): "));
  1047.   
  1048.       /* Set the state such that text can be selected/copied/pasted and we still
  1049.        * get mouse events. */
  1050. --- 3245,3253 ----
  1051.   
  1052.       /* When using ":silent" assume that <CR> was entered. */
  1053.       if (mouse_used != NULL)
  1054. !     MSG_PUTS(_("Type number and <Enter> or click with mouse (empty cancels): "));
  1055.       else
  1056. !     MSG_PUTS(_("Type number and <Enter> (empty cancels): "));
  1057.   
  1058.       /* Set the state such that text can be selected/copied/pasted and we still
  1059.        * get mouse events. */
  1060. *** ../vim-7.2.030/src/proto/eval.pro    Sun Jan  6 20:06:30 2008
  1061. --- src/proto/eval.pro    Sun Nov  9 12:05:56 2008
  1062. ***************
  1063. *** 17,23 ****
  1064.   int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip));
  1065.   char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip));
  1066.   int skip_expr __ARGS((char_u **pp));
  1067. ! char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int dolist));
  1068.   char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd, int use_sandbox));
  1069.   int eval_to_number __ARGS((char_u *expr));
  1070.   list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr));
  1071. --- 17,23 ----
  1072.   int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip));
  1073.   char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip));
  1074.   int skip_expr __ARGS((char_u **pp));
  1075. ! char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int convert));
  1076.   char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd, int use_sandbox));
  1077.   int eval_to_number __ARGS((char_u *expr));
  1078.   list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr));
  1079. ***************
  1080. *** 46,52 ****
  1081. --- 46,54 ----
  1082.   void list_unref __ARGS((list_T *l));
  1083.   void list_free __ARGS((list_T *l, int recurse));
  1084.   dictitem_T *dict_lookup __ARGS((hashitem_T *hi));
  1085. + char_u *list_find_str __ARGS((list_T *l, long idx));
  1086.   int list_append_dict __ARGS((list_T *list, dict_T *dict));
  1087. + int list_append_string __ARGS((list_T *l, char_u *str, int len));
  1088.   int garbage_collect __ARGS((void));
  1089.   dict_T *dict_alloc __ARGS((void));
  1090.   int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str));
  1091. ***************
  1092. *** 58,65 ****
  1093. --- 60,69 ----
  1094.   void set_vim_var_nr __ARGS((int idx, long val));
  1095.   long get_vim_var_nr __ARGS((int idx));
  1096.   char_u *get_vim_var_str __ARGS((int idx));
  1097. + list_T *get_vim_var_list __ARGS((int idx));
  1098.   void set_vcount __ARGS((long count, long count1));
  1099.   void set_vim_var_string __ARGS((int idx, char_u *val, int len));
  1100. + void set_vim_var_list __ARGS((int idx, list_T *val));
  1101.   void set_reg_var __ARGS((int c));
  1102.   char_u *v_exception __ARGS((char_u *oldval));
  1103.   char_u *v_throwpoint __ARGS((char_u *oldval));
  1104. ***************
  1105. *** 94,99 ****
  1106. --- 98,104 ----
  1107.   void write_viminfo_varlist __ARGS((FILE *fp));
  1108.   int store_session_globals __ARGS((FILE *fd));
  1109.   void last_set_msg __ARGS((scid_T scriptID));
  1110. + void ex_oldfiles __ARGS((exarg_T *eap));
  1111.   int modify_fname __ARGS((char_u *src, int *usedlen, char_u **fnamep, char_u **bufp, int *fnamelen));
  1112.   char_u *do_string_sub __ARGS((char_u *str, char_u *pat, char_u *sub, char_u *flags));
  1113.   /* vim: set ft=c : */
  1114. *** ../vim-7.2.030/src/proto/ex_cmds.pro    Sat May  5 20:13:58 2007
  1115. --- src/proto/ex_cmds.pro    Sat Sep 13 17:27:21 2008
  1116. ***************
  1117. *** 11,17 ****
  1118.   char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
  1119.   void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname));
  1120.   int viminfo_error __ARGS((char *errnum, char *message, char_u *line));
  1121. ! int read_viminfo __ARGS((char_u *file, int want_info, int want_marks, int forceit));
  1122.   void write_viminfo __ARGS((char_u *file, int forceit));
  1123.   int viminfo_readline __ARGS((vir_T *virp));
  1124.   char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert));
  1125. --- 11,17 ----
  1126.   char_u *make_filter_cmd __ARGS((char_u *cmd, char_u *itmp, char_u *otmp));
  1127.   void append_redir __ARGS((char_u *buf, char_u *opt, char_u *fname));
  1128.   int viminfo_error __ARGS((char *errnum, char *message, char_u *line));
  1129. ! int read_viminfo __ARGS((char_u *file, int flags));
  1130.   void write_viminfo __ARGS((char_u *file, int forceit));
  1131.   int viminfo_readline __ARGS((vir_T *virp));
  1132.   char_u *viminfo_readstring __ARGS((vir_T *virp, int off, int convert));
  1133. *** ../vim-7.2.030/src/proto/mark.pro    Sat May  5 19:29:37 2007
  1134. --- src/proto/mark.pro    Sat Sep 13 18:06:20 2008
  1135. ***************
  1136. *** 26,30 ****
  1137.   void write_viminfo_filemarks __ARGS((FILE *fp));
  1138.   int removable __ARGS((char_u *name));
  1139.   int write_viminfo_marks __ARGS((FILE *fp_out));
  1140. ! void copy_viminfo_marks __ARGS((vir_T *virp, FILE *fp_out, int count, int eof));
  1141.   /* vim: set ft=c : */
  1142. --- 26,30 ----
  1143.   void write_viminfo_filemarks __ARGS((FILE *fp));
  1144.   int removable __ARGS((char_u *name));
  1145.   int write_viminfo_marks __ARGS((FILE *fp_out));
  1146. ! void copy_viminfo_marks __ARGS((vir_T *virp, FILE *fp_out, int count, int eof, int flags));
  1147.   /* vim: set ft=c : */
  1148. *** ../vim-7.2.030/src/option.c    Thu Oct  2 22:48:01 2008
  1149. --- src/option.c    Fri Sep 26 22:20:20 2008
  1150. ***************
  1151. *** 2593,2605 ****
  1152.   #ifdef FEAT_VIMINFO
  1153.                   (char_u *)&p_viminfo, PV_NONE,
  1154.   #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
  1155. !                 {(char_u *)"", (char_u *)"'20,<50,s10,h,rA:,rB:"}
  1156.   #else
  1157.   # ifdef AMIGA
  1158.                   {(char_u *)"",
  1159. !                  (char_u *)"'20,<50,s10,h,rdf0:,rdf1:,rdf2:"}
  1160.   # else
  1161. !                 {(char_u *)"", (char_u *)"'20,<50,s10,h"}
  1162.   # endif
  1163.   #endif
  1164.   #else
  1165. --- 2593,2605 ----
  1166.   #ifdef FEAT_VIMINFO
  1167.                   (char_u *)&p_viminfo, PV_NONE,
  1168.   #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
  1169. !                 {(char_u *)"", (char_u *)"'100,<50,s10,h,rA:,rB:"}
  1170.   #else
  1171.   # ifdef AMIGA
  1172.                   {(char_u *)"",
  1173. !                  (char_u *)"'100,<50,s10,h,rdf0:,rdf1:,rdf2:"}
  1174.   # else
  1175. !                 {(char_u *)"", (char_u *)"'100,<50,s10,h"}
  1176.   # endif
  1177.   #endif
  1178.   #else
  1179. *** ../vim-7.2.030/src/structs.h    Thu Jul 31 22:04:27 2008
  1180. --- src/structs.h    Fri Sep 19 19:15:18 2008
  1181. ***************
  1182. *** 459,465 ****
  1183.   typedef struct
  1184.   {
  1185.       int        hide;            /* TRUE when ":hide" was used */
  1186. ! # ifdef FEAT_BROWSE
  1187.       int        browse;            /* TRUE to invoke file dialog */
  1188.   # endif
  1189.   # ifdef FEAT_WINDOWS
  1190. --- 459,465 ----
  1191.   typedef struct
  1192.   {
  1193.       int        hide;            /* TRUE when ":hide" was used */
  1194. ! # ifdef FEAT_BROWSE_CMD
  1195.       int        browse;            /* TRUE to invoke file dialog */
  1196.   # endif
  1197.   # ifdef FEAT_WINDOWS
  1198. *** ../vim-7.2.030/src/vim.h    Sat Aug  9 19:37:40 2008
  1199. --- src/vim.h    Sat Sep 13 17:41:24 2008
  1200. ***************
  1201. *** 1728,1734 ****
  1202.   #define VV_MOUSE_COL    51
  1203.   #define VV_OP        52
  1204.   #define VV_SEARCHFORWARD 53
  1205. ! #define VV_LEN        54    /* number of v: vars */
  1206.   
  1207.   #ifdef FEAT_CLIPBOARD
  1208.   
  1209. --- 1728,1735 ----
  1210.   #define VV_MOUSE_COL    51
  1211.   #define VV_OP        52
  1212.   #define VV_SEARCHFORWARD 53
  1213. ! #define VV_OLDFILES    54
  1214. ! #define VV_LEN        55    /* number of v: vars */
  1215.   
  1216.   #ifdef FEAT_CLIPBOARD
  1217.   
  1218. ***************
  1219. *** 2054,2057 ****
  1220. --- 2055,2064 ----
  1221.   #define DOSO_VIMRC    1    /* loading vimrc file */
  1222.   #define DOSO_GVIMRC    2    /* loading gvimrc file */
  1223.   
  1224. + /* flags for read_viminfo() and children */
  1225. + #define VIF_WANT_INFO        1    /* load non-mark info */
  1226. + #define VIF_WANT_MARKS        2    /* load file marks */
  1227. + #define VIF_FORCEIT        4    /* overwrite info already read */
  1228. + #define VIF_GET_OLDFILES    8    /* load v:oldfiles */
  1229.   #endif /* VIM__H */
  1230. *** ../vim-7.2.030/src/version.c    Thu Nov  6 20:47:00 2008
  1231. --- src/version.c    Sun Nov  9 13:39:19 2008
  1232. ***************
  1233. *** 678,679 ****
  1234. --- 678,681 ----
  1235.   {   /* Add new patch number below this line */
  1236. + /**/
  1237. +     31,
  1238.   /**/
  1239.  
  1240. -- 
  1241. hundred-and-one symptoms of being an internet addict:
  1242. 217. Your sex life has drastically improved...so what if it's only cyber-sex!
  1243.  
  1244.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  1245. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  1246. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  1247.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  1248.