To: vim_dev@googlegroups.com Subject: Patch 7.4.1987 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- 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 ///