Skip to content

Commit

Permalink
Merge pull request #2559 from Chillee/fixundoissues
Browse files Browse the repository at this point in the history
Hopefully fixing the rest of our undo issues
  • Loading branch information
Chillee authored Apr 24, 2018
2 parents e891dac + 45e8eb2 commit 6bab46d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/editorIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,24 @@ import * as vscode from 'vscode';

export class EditorIdentity {
private _fileName: string;
private _viewColumn: vscode.ViewColumn;

constructor(textEditor?: vscode.TextEditor) {
this._fileName = (textEditor && textEditor.document && textEditor.document.fileName) || '';
this._viewColumn = (textEditor && textEditor.viewColumn) || vscode.ViewColumn.One;
}

get fileName() {
return this._fileName;
}

get viewColumn() {
return this._viewColumn;
}

public hasSameBuffer(identity: EditorIdentity): boolean {
return this.fileName === identity.fileName;
}

public isEqual(other: EditorIdentity): boolean {
return this.fileName === other.fileName && this.viewColumn === other.viewColumn;
return this.fileName === other.fileName;
}

public toString() {
return this.fileName + this.viewColumn;
return this.fileName;
}
}

0 comments on commit 6bab46d

Please sign in to comment.