Skip to content

Commit 0fd6be7

Browse files
committed
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)
1 parent eda9e9c commit 0fd6be7

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/terminal.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4094,7 +4094,12 @@ read_dump_file(FILE *fd, VTermPos *cursor_pos)
40944094
{
40954095
if (c == EOF)
40964096
break;
4097-
if (c == '\n')
4097+
if (c == '\r')
4098+
{
4099+
// DOS line endings? Ignore.
4100+
c = fgetc(fd);
4101+
}
4102+
else if (c == '\n')
40984103
{
40994104
/* End of a line: append it to the buffer. */
41004105
if (ga_text.ga_data == NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
491,
795797
/**/
796798
490,
797799
/**/

0 commit comments

Comments
 (0)