0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.903

Problem:    Crash on exit writing viminfo. (Ron Aaron)
Solution:   Check for the history to be empty.
This commit is contained in:
Bram Moolenaar 2013-04-15 16:14:22 +02:00
parent 4c7e9db0d6
commit a8565fecc6
2 changed files with 11 additions and 1 deletions

View File

@ -6216,7 +6216,15 @@ write_viminfo_history(fp)
*/
for (round = 1; round <= 2; ++round)
{
i = round == 1 ? hisidx[type] : 0;
if (round == 1)
/* start at newest entry, somewhere in the list */
i = hisidx[type];
else if (viminfo_hisidx[type] > 0)
/* start at newest entry, first in the list */
i = 0;
else
/* empty list */
i = -1;
if (i >= 0)
while (num_saved > 0
&& !(round == 2 && i >= viminfo_hisidx[type]))

View File

@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
903,
/**/
902,
/**/