Skip to content

Commit

Permalink
Reverted regression in historyTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
westim committed Nov 12, 2017
1 parent d14f7b8 commit e178877
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/history/historyTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ class HistoryStep {
cursorEnd?: Position[] | undefined;
marks?: IMark[];
}) {
this.changes = init.changes || [];
// This is a bug, but fixing it causes regressions. See PR #2081.
this.changes = init.changes = [];
this.isFinished = init.isFinished || false;
this.cursorStart = init.cursorStart || undefined;
this.cursorEnd = init.cursorEnd || undefined;
Expand Down Expand Up @@ -607,11 +608,11 @@ export class HistoryTracker {
}

const newStep = new HistoryStep({
changes: changesToUndo,
isFinished: true,
cursorStart: [lastChange.start],
cursorEnd: [lastChange.start],
});
newStep.changes = changesToUndo;

this.historySteps.push(newStep);

Expand Down

0 comments on commit e178877

Please sign in to comment.