diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-10-23 21:42:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-10-23 21:42:59 +0200 |
commit | 0fd6be77de6c1570bd320fc89ba82b7018ac29ae (patch) | |
tree | ef9bde854be5446b37de6fa22a83f12fa9bdf211 /src | |
parent | eda9e9c2fe4577ad451418253b990a3f60b70444 (diff) | |
download | vim-git-0fd6be77de6c1570bd320fc89ba82b7018ac29ae.tar.gz |
patch 8.1.0491: if a terminal dump has CR it is considered corruptv8.1.0491
Problem: If a terminal dump has CR it is considered corrupt.
Solution: Ignore CR characters. (Nobuhiro Takasaki, closes #3558)
Diffstat (limited to 'src')
-rw-r--r-- | src/terminal.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c index 4e62253d5..6927d6902 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -4094,7 +4094,12 @@ read_dump_file(FILE *fd, VTermPos *cursor_pos) { 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 index a34837bb2..ad9b575d0 100644 --- 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, |