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

patch 8.1.0491: if a terminal dump has CR it is considered corrupt

Problem:    If a terminal dump has CR it is considered corrupt.
Solution:   Ignore CR characters. (Nobuhiro Takasaki, closes #3558)
This commit is contained in:
Bram Moolenaar 2018-10-23 21:42:59 +02:00
parent eda9e9c2fe
commit 0fd6be77de
2 changed files with 8 additions and 1 deletions

View File

@ -4094,7 +4094,12 @@ read_dump_file(FILE *fd, VTermPos *cursor_pos)
{ {
if (c == EOF) if (c == EOF)
break; break;
if (c == '\n') if (c == '\r')
{
// DOS line endings? Ignore.
c = fgetc(fd);
}
else if (c == '\n')
{ {
/* End of a line: append it to the buffer. */ /* End of a line: append it to the buffer. */
if (ga_text.ga_data == NULL) if (ga_text.ga_data == NULL)

View File

@ -792,6 +792,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 */
/**/
491,
/**/ /**/
490, 490,
/**/ /**/