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:
parent
eda9e9c2fe
commit
0fd6be77de
@ -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)
|
||||
|
@ -792,6 +792,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
491,
|
||||
/**/
|
||||
490,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user