Patch 7.4.1987
Problem: When copying unrecognized lines for viminfo, end up with useless
continuation lines.
Solution: Skip continuation lines.
Files: src/ex_cmds.c
*** ../vim-7.4.1986/src/ex_cmds.c 2016-07-01 18:16:47.489936307 +0200
--- src/ex_cmds.c 2016-07-02 22:27:37.566693773 +0200
***************
*** 2834,2846 ****
{
int i;
garray_T *gap = &virp->vir_barlines;
if (gap->ga_len > 0)
{
fputs(_("\n# Bar lines, copied verbatim:\n"), fp_out);
for (i = 0; i < gap->ga_len; ++i)
! fputs(((char **)(gap->ga_data))[i], fp_out);
}
}
#endif /* FEAT_VIMINFO */
--- 2834,2856 ----
{
int i;
garray_T *gap = &virp->vir_barlines;
+ int seen_useful = FALSE;
+ char *line;
if (gap->ga_len > 0)
{
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)
! {
! line = ((char **)(gap->ga_data))[i];
! if (seen_useful || line[1] != '<')
! {
! fputs(line, fp_out);
! seen_useful = TRUE;
! }
! }
}
}
#endif /* FEAT_VIMINFO */
*** ../vim-7.4.1986/src/version.c 2016-07-02 22:07:16.992688114 +0200
--- src/version.c 2016-07-02 22:27:15.123024721 +0200
***************
*** 760,761 ****
--- 760,763 ----
{ /* Add new patch number below this line */
+ /**/
+ 1987,
/**/
--
I'm in shape. Round IS a shape.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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/d/optout.