# HG changeset patch # User Bram Moolenaar # Date 1540323906 -7200 # Node ID 47931abb9f31e5a0a629a9fc8020471afa9c96ed # Parent a843426fc81b3ea76bf498b2bc98679d3bb4e40a patch 8.1.0491: if a terminal dump has CR it is considered corrupt commit https://github.com/vim/vim/commit/0fd6be77de6c1570bd320fc89ba82b7018ac29ae Author: Bram Moolenaar Date: Tue Oct 23 21:42:59 2018 +0200 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 https://github.com/vim/vim/issues/3558) diff --git a/src/terminal.c b/src/terminal.c --- a/src/terminal.c +++ b/src/terminal.c @@ -4094,7 +4094,12 @@ read_dump_file(FILE *fd, VTermPos *curso { if (c == EOF) 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. */ if (ga_text.ga_data == NULL) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -793,6 +793,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 491, +/**/ 490, /**/ 489,