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:
parent
4c7e9db0d6
commit
a8565fecc6
@ -6216,7 +6216,15 @@ write_viminfo_history(fp)
|
|||||||
*/
|
*/
|
||||||
for (round = 1; round <= 2; ++round)
|
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)
|
if (i >= 0)
|
||||||
while (num_saved > 0
|
while (num_saved > 0
|
||||||
&& !(round == 2 && i >= viminfo_hisidx[type]))
|
&& !(round == 2 && i >= viminfo_hisidx[type]))
|
||||||
|
@ -728,6 +728,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
903,
|
||||||
/**/
|
/**/
|
||||||
902,
|
902,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user