mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 7.4.1987
Problem: When copying unrecognized lines for viminfo, end up with useless continuation lines. Solution: Skip continuation lines.
This commit is contained in:
@@ -2834,13 +2834,23 @@ write_viminfo_barlines(vir_T *virp, FILE *fp_out)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
garray_T *gap = &virp->vir_barlines;
|
garray_T *gap = &virp->vir_barlines;
|
||||||
|
int seen_useful = FALSE;
|
||||||
|
char *line;
|
||||||
|
|
||||||
if (gap->ga_len > 0)
|
if (gap->ga_len > 0)
|
||||||
{
|
{
|
||||||
fputs(_("\n# Bar lines, copied verbatim:\n"), fp_out);
|
fputs(_("\n# Bar lines, copied verbatim:\n"), fp_out);
|
||||||
|
|
||||||
|
/* Skip over continuation lines until seeing a useful line. */
|
||||||
for (i = 0; i < gap->ga_len; ++i)
|
for (i = 0; i < gap->ga_len; ++i)
|
||||||
fputs(((char **)(gap->ga_data))[i], fp_out);
|
{
|
||||||
|
line = ((char **)(gap->ga_data))[i];
|
||||||
|
if (seen_useful || line[1] != '<')
|
||||||
|
{
|
||||||
|
fputs(line, fp_out);
|
||||||
|
seen_useful = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* FEAT_VIMINFO */
|
#endif /* FEAT_VIMINFO */
|
||||||
|
@@ -758,6 +758,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 */
|
||||||
|
/**/
|
||||||
|
1987,
|
||||||
/**/
|
/**/
|
||||||
1986,
|
1986,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user