commit d27f86179a20035dda9a5eb0d74dda269dae671c from: Stefan Sperling via: Thomas Adam date: Sun Oct 17 18:47:56 2021 UTC set oldo.to in diff3.c's duplicate() even if the file contains no newlines commit - 8e831ff19c364e7b4a4d77885cd3421502daeed3 commit + d27f86179a20035dda9a5eb0d74dda269dae671c blob - 760f87b7c0057df475e28cc403bb02373f19f7f2 blob + 83a6b8e3a481fb9bcce5cdacd3e06b5295a7bfeb --- lib/diff3.c +++ lib/diff3.c @@ -925,6 +925,10 @@ duplicate(int *dpl, int j, struct line_range *r1, stru } } while (c != '\n'); } + + /* original lines end here */ + d3s->de[j + 1].oldo.to = off + nchar; + err = repos(nchar, d3s); if (err) return err;