Commit graph

4 commits

Author SHA1 Message Date
Owen W. Taylor
698633815f reapplyWithMyersDiff(): don't skip trailing blank lines
myersDiff inherits the jsdiff behavior for trailing \n, so would
consider "foo\n" => "foo" a changed single line, rather than a change
from "foo", "" to "foo" - this would result in a trailing blank line
in the highlighted region silently vanishing from the buffer.

Adding \n to the inputs so that lines are \n terminated rather than
separated fixes this.

To make myersDiff logically consistent, pass ignoreNewlineAtEof: true
to jsdiff. (This is actually not needed for this bug fix.)
2025-02-25 15:36:40 -05:00
Ruedi Steinmann
9986cfb35c Fix ranges/union() 2024-11-30 11:17:40 +01:00
Test
b5cab4609b chore: apply eslint to vscode and core 2024-11-11 07:38:52 -08:00
Nate
fe58421cc4 myers diff utility 2024-09-13 15:45:24 -07:00