diff --git a/src/components/differences_view.ts b/src/components/differences_view.ts index 358e256..39e2d80 100644 --- a/src/components/differences_view.ts +++ b/src/components/differences_view.ts @@ -64,8 +64,9 @@ export class DifferencesView extends ItemView { structuredPatch( this.file1.path, this.file2.path, - this.file1Content, - this.file2Content + // Ignore empty lines at the end as they are difficult to handle + this.file1Content.trimEnd(), + this.file2Content.trimEnd() ) ) @@ -162,10 +163,4 @@ export class DifferencesView extends ItemView { }).open() }) } - - delay(ms: number): Promise { - return new Promise((resolve) => { - setTimeout(resolve, ms) - }) - } }